Changing my UID and GID

Kurt Wall kwall
Mon May 17 11:59:45 PDT 2004


In a 0.5K blaze of typing glory, Michael Hipp wrote:
> I may need to change my UID and GID so I can share /home between two 
> different distros. Will this procedure do the trick?
> 
> 1. Edit /etc/passwd and change the UID there
> 2. Edit /etc/group and change the GID there
> 3. Do 'chown -R newuid:newgid /home/goober'
> 
> Is there anything more to do? Any problems this will present?

This looks like it would do it. Before the change, though, I'd run
a "find / -user goober > /tmp/before". After the change, I'd run
"find / -user goober > /tmp/after". Finally, I'd diff the two files
to make sure nothing had gone awry in the change.

Kurt
-- 
New Hampshire law forbids you to tap your feet, nod your head, or in
any way keep time to the music in a tavern, restaurant, or cafe.


More information about the Linux-users mailing list