From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075320706564.tru64-unix-managers.marc@archive.invalid> From: sherry () canidae ! cps ! msu ! edu Date: Mon, 19 Jun 1995 16:45:51 +0000 To: tru64-unix-managers Subject: SUMMARY: Owner of files and directories X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075320706564 Thank all for the replies. This is the greatest mailing list I have ever been on. My original question: > I added Rsherry to the /etc/passwd file to have the same uid and > gid as root. Somehow all the files and dirctories originally owned by > root are now owned by Rsherry. Command "chown" will not do anything, > because Rsherry has the same uid as root. I deleted Rsherry from the > passwd file hoping that will put things back to what they were. But > they remain the same. It is really annoying. > > How can I have them changed back to owned by root? Later I said I solve the problem by removing /etc/passwd.pag and passwd.dir. Well, that is not quite a sysadmin solution. :-) Correct solution: Thanks to Patrick O'Brien > Right; that's what mkpasswd does. It re-builds those > files for faster lookups. The way to modify the passwd file is > with vipw. It creates a lock on the passwd file, makes a backup > of it in case your system crashes during the edits, and then > when you're through editing, it runs mkpasswd to update passwd.pag > and passwd.dir. and Ray Bellis > Real answer: Always use `vipw' to edit the password file. The `passwd.pag' > and `passwd.dir' files are hashed database files designed to speed up access > to password information. When you edited the password file the database > files weren't kept up to date, thus causing the problem you saw. Thanks all that replied. I really appreciate it. Michael A. Crowley Thanks! nicolis@celfi.phys.univ-tours.fr vladimir@cfd1.eng.tau.ac.il Danny J. Mitzel Ray Bellis Michael R. Kline Michel Cyr Sherry