|
|
#1 |
|
Prospect
Join Date: May 2003
Location: Brisbane
Posts: 15
|
changing uid and gid numbers for users in os x
newbie warning, day 5 with os x now!
I posted a previous question here about connecting to a linux server from an os x client using nfs, and got an answer that was spot on. User richard (me) has uid/gid 500 on the linux (RH8) server and uid/gid 501 on the os x client. I tried changing my uid in the utilities/netinfo manager application, which of course did not work. I tried logging in as superuser, but I don't know its password. So 2 new questions: how do I change uid/gid for users in os x; and how do I log onto the os x system as root (superuser)? TIA Richard |
|
|
|
|
|
#2 |
|
Major Leaguer
Join Date: Feb 2003
Posts: 263
|
For both questions:
Netinfo Manager, in /Applications/Utilities There is a menu option to enable the root user, which is actually disabled for safety at installation. You shouldn't really need to do this, but it can make some things easier. sudo and Pseudo (launches any app as root) can do pretty much everything you need to do. To change uid/gid, navigate through the hierarchy to /users and /groups, and you can click on each user or group and change its properties in the bottom part of the window. Be careful with a uid of less than 501; I believe X has a threshold (501 or 500 or something) under which users are not displayed in the GUI login panel. |
|
|
|
|
|
#3 |
|
Major Leaguer
Join Date: Jan 2002
Location: Northern Virginai
Posts: 294
|
After you change the UID, you will also need to change the ownership of every file on your disk to be owned by the "new you." Changing the UID value in Netinfo Manager only changes the numerical value associated with your short username.
Here's a pointer to a hint on the main site that talks about fixing all of your files: http://www.macosxhints.com/article.p...11021095120946 |
|
|
|
|
|
#4 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
changing a user uid is not a trivial operation. one must also gather all files that belonged to the old uid and reassign them to either the new uid or some other appropriate ownership. right?
[edit: right. what houchin said]
__________________
On a clear disk, you can seek forever. Last edited by mervTormel; 05-25-2003 at 12:23 AM. |
|
|
|
|
|
#5 |
|
Prospect
Join Date: May 2003
Location: Brisbane
Posts: 15
|
thanks for the help
thanks guys,
as one of you noted, changing uids on the iBook was not trivial, it was much much simpler to change the uids on the linux server using Webmin (is there a version for os x?). NFS works a treat with the same uids. Still got a bit of work to do to get the network humming, (setting up automounts, making the serverf home drives the defaults, getting the samba printing working etc) but its happening. ty richard |
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Dec 2002
Posts: 441
|
Webmin works fine on OS X.
Changing UIDs in the terminal is a simple NetInfo property overwrite: sudo niutil -createprop . /users/userName uid XXX (replace userName as appropriate and XXX with the new UID number) Finding and changing UIDs across the filesystem is a one-liner command: sudo find / -user UID -exec chown userName {} \; (replace UID with the old UID number and userName with the new user name to associate file ownership.) Last edited by gatorparrots; 05-25-2003 at 07:26 AM. |
|
|
|
![]() |
|
|