Re: Change User ID
Re: Change User ID
- Subject: Re: Change User ID
- From: Creed Erickson <email@hidden>
- Date: Sat, 7 Jun 2003 14:25:41 -0700
On Saturday, June 7, 2003, at 11:24 AM, Lorenzo wrote:
Hi list,
I have the user "x" on the machine "A" with the userID 501
and the same user "x" on the machine "B" with the userID 502.
When I copy a "x" user's file from the machine "A" to the machine "B"
using
a routine I downloaded from the Apple Developer Web Site
"FSCopyObject.c"
the destination file still has the userID 501, but it belongs to an
unknown
user because there is no user with the userID 501 on the machine "B".
How can I give to the destination file the proper userName "x"?
Should I get the userID of the userName "x" on the remote machine "B",
then
set it to the file?
If so, please, how should I do all of that?
You will have to be logged in as the administrative user to do any of
this.
To change ownership of "file" to user X, use the terminal.app command:
sudo chown X file
To change all the files in a directory tree to user X, use the
terminal.app command:
sudo chown -R X .
This will affect all files and directories in the current working
directory recursively.
If these are indeed the same person, you might want to make them the
same UID on both machines. To change user X to UID 501 from a terminal
window:
sudo nicl . -create /users/X uid 501
cd /Users
sudo chown -R 501 X
Again, this will require that you are logged in as the administrative
user.
If X is both the administrative user AND the user you wish to change,
you may want to add another dummy admin user to do this from. i.e.,
Don't try this on the ONLY admin user account on the system. If
something goes wrong, you could be royally screwed.
-- C
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.