On Tue, Aug 01, 2000 at 03:17:07PM -0400, Jake McHenry wrote:
>
> I used to know how to do this, but have forgotten the what the name
> of the file was that did this. As I've been cleaning my system of
> users no longer here, I've been noticing accounts that name's do not
> match the login name. I know that there is a file that allows anyone
> to do this, and I want to change the owner to root, so only I can do
> it. Sorry if this is an easy one, but I forgot what is was called.
/etc/passwd maps names/userinfo to user id's.
/etc/group does the same thing for group id's.
When you get rid of a user account, you should use the userdel command
which does the exact opposite of useradd, then run periodically
find / -nouser -print
This will give you a list of all the files on the filesystem which are
owned by a userid which is no longer in /etc/passwd (-nogroup also
does what you would expect)
find / -nouser -print | xargs rm
is a good method for cleaning up after old user accounts, once you
make sure the find command is locating only those old files.
(you have to be careful since rpms and tar files sometimes contain
files with userid's foreign to your machine, and you don't necessarily
want to delete all them)
If you want to make all the 'unknown user' files owned by root (and
group root) instead, simply run:
find / -nouser -print | xargs chown root.root
--
Steve Borho Voice: TBA
Member of Technical Staff
Celox Networking Inc
Fortune of the day:
Parkinson's Fourth Law:
The number of people in any working group tends to increase
regardless of the amount of work to be done.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.