How to change ownership of files after recreating user with a dif ferent UID #?

From: Notari, Ed <NotariE_at_usa.redcross.org>
Date: Tue, 27 Jul 1999 09:02:31 -0400

Hello managers,

First off, I screwed up!

I mistakenly deleted a users account and the files in his "home" directory.
After recreating his account with dxaccounts I restored his files from the
previous days backup. Unfortunately when recreating his account I failed to
look through the passwd file and get his previous UID # (102), instead I let
dxaccounts choose the next UID (201).

The problem is that this user has files all over the system (rightly so in
my case) and all of them are owned by "102". For his "home" directory it
was easy enough to do a recursive chown with his username to reset the UID#.
My question is how do I do the same through out the system? It does not
appear that chown has this capability. Also, I would like to clean up the
passwd file to remove the 102 entry, what would be the best way to do this
and in what order given, the first problem?

Thanks in advance for any and all help!

Ed Notari
notarie_at_usa.redcross.org
Received on Tue Jul 27 1999 - 13:04:49 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT