* SUMMARY: Owner of files and directories
@ 1995-06-19 16:45 sherry
0 siblings, 0 replies; only message in thread
From: sherry @ 1995-06-19 16:45 UTC (permalink / raw)
To: tru64-unix-managers
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 <pobrien@draco.harvard.edu>
> 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 <rpb@psy.ox.ac.uk>
> 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 <mcrowley@mhc.mtholyoke.edu> Thanks!
nicolis@celfi.phys.univ-tours.fr
vladimir@cfd1.eng.tau.ac.il
Danny J. Mitzel <dmitzel@everest.hitc.com>
Ray Bellis <rpb@psy.ox.ac.uk>
Michael R. Kline <mike@lib.utexas.edu>
Michel Cyr <cyrmiche@sidoci.qc.ca>
Sherry
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1995-06-19 16:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-06-19 16:45 SUMMARY: Owner of files and directories sherry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox