Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'or try this' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
or try this
Authored by: soellman on Oct 22, '01 03:11:33PM

sudo find <directory> -user <olduidnumber> -exec chown <newuid> {} \; -print

for instance:

sudo find / -user 500 -exec chown oliver {} \; -print


this should do the same thing, at about the same speed.

NOTE: this board is erasing the backslash directly before the semicolon.. insert it after you paste into the terminal.

cheers,
-o



[ Reply to This | # ]
or try this
Authored by: soellman on Oct 31, '01 03:36:48PM

warnings!

yes, this is only one piece of the puzzle if you're trying to change user ids. you'll also want to go into the netinfo manager and change the groups referring to userid 501, in addition to the user whose id is changing from 501 to whatever.

I would recommend doing any of this while logged in as root. You may also want to deal with (delete) the .Trash/501 folders (something like that, basically a uid specific trash).



[ Reply to This | # ]
or try this
Authored by: smurf on Nov 02, '01 03:31:33AM

Still too much work.

sudo find / -xdev -user 501 -print0 | xargs -0 chown 202

(501 was my old uid; 202 is the new one)

The -xdev prevents walking off onto your NFS-mounted volumes.
The -print0 and -0 force zero-byte filename termination instead of newlines, which is important because otherwise xargs will interpret spaces too. :-(



[ Reply to This | # ]
or try this
Authored by: Xzklm on Aug 02, '04 02:37:19PM

well this threat is quite old, but i had to deal with this topic lately
the command line work well, if you add anouther sudo, like:

sudo find / -xdev -user 501 -print0 | sudo xargs -0 chown 202
.........................................................^^^



[ Reply to This | # ]
or try this
Authored by: DMCrimson on Jun 15, '05 05:40:22PM

I decided to try this one when I changed my uid & guid from 503 to 501 (a bit hosed installation, ended deleting the first account). Due to my own stupidity, I ended up with total hang and having to reboot the machine, resulting with no rights whatsoever to my own homedir. luckily, I was able to use the other account to find the information mentioned above, thus regaining the system:)



[ Reply to This | # ]