consequences of changing uid/gid on snow leopard

5

2

ok, so I introduced a Mac laptop to my home network of Kubuntu hosts and Fedora servers. Currently I don't have NIS or LDAP setup (I got only 2 users) and I just manually setup the UID/GID on the hosts. I would like to run the following command on my Macbook:

dscl . -change /Users/me UniqueID 501 1000
dscl . -change /Users/me PrimaryGroupID 20 503
chown -R 1000:503 /Users/me
dscl . append /Groups/staff GroupMembership me

Before I go on to hose my new Mac, I would like to know if this is the right thing to do and, if so, what are the adverse consequences I may have.

Thanks.

Peter Carrero

Posted 2010-04-25T16:46:24.130

Reputation: 325

I don't know the answer, but I've always been wondered a bit by the procedure to preserve file ownership in Apple's How to change user short name or home directory name. Hence, without any reason whatsoever, I would also be a bit reluctant to mess with other user attributes... (Nice question!)

– Arjan – 2010-04-25T17:06:58.777

@Arjan, very interesting info on the link you provided! Creating a new user would generate a new uid, so I feel a bit more comfortable changing that. Now Apple's default group is the "staff" with gid 20. I wonder if it is better to just add my 503 group instead of making it primary. Thanks for the insightful comment! – Peter Carrero – 2010-04-25T17:19:19.887

Answers

2

well, throughout today I ended up doing exactly what I had outlined on the question. I've been using the mac the whole day today and so far, I've seen no adverse effect and I can finally access my NFS shares without problems. I guess continuous use will be the final test... If I do run into any issues I will update this answer.

Peter Carrero

Posted 2010-04-25T16:46:24.130

Reputation: 325

2

today - months after the initial quest - i found an easier way of doing the same thing: using apple's server admin tools on your local mac. they can be found [here][1]. install and go to applications->server->workgroup manager.

in there you will see an option to change the uid of users (as well as a bunch of other options)

[1]: http://support.apple.com/downloads/#server admin tools

Peter Carrero

Posted 2010-04-25T16:46:24.130

Reputation: 325

0

I changed my uid to 1000 and the one adverse effect I have had is that my account is no longer displayed in the login window when it is set up to show icons for users. I know only see my wife's account and the "Other..." option where I have to click and then manually enter user name and password. Not a big hassle, but it is an extra couple clicks to get into my account.

queso

Posted 2010-04-25T16:46:24.130

Reputation: 752

Interesting point! I'm the only user of my mac, so this didn't happen to me. Thanks for the update. – Peter Carrero – 2010-06-03T11:46:05.130

Does anyone know the solution to this problem (or how to prevent it, in the first place)? – lindes – 2011-01-21T20:58:29.270