tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: sherry () canidae ! cps ! msu ! edu
To: tru64-unix-managers
Subject: SUMMARY: Owner of files and directories
Date: Mon, 19 Jun 1995 16:45:51 +0000	[thread overview]
Message-ID: <96075320706564.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~1995-06-19 16:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox