Go Back   The macosxhints Forums > OS X Help Requests > Networking



Reply
 
Thread Tools Rating: Thread Rating: 19 votes, 5.00 average. Display Modes
Old 05-24-2003, 10:50 PM   #1
rsara
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
rsara is offline   Reply With Quote
Old 05-24-2003, 11:02 PM   #2
aixccapt99
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.
aixccapt99 is offline   Reply With Quote
Old 05-24-2003, 11:31 PM   #3
houchin
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
houchin is offline   Reply With Quote
Old 05-25-2003, 12:09 AM   #4
mervTormel
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.
mervTormel is offline   Reply With Quote
Old 05-25-2003, 06:30 AM   #5
rsara
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
rsara is offline   Reply With Quote
Old 05-25-2003, 07:24 AM   #6
gatorparrots
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.
gatorparrots is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:20 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.