Date: Wed, 13 May 1998 21:28:56 -0400 (EDT) From: CyberPeasant <djv@bedford.net> To: dima@zwb.net (Dima Dorfman) Cc: djv@bedford.net, freebsd-questions@FreeBSD.ORG Subject: Re: renaming of usernames and homedirectories Message-ID: <199805140128.VAA08447@castor.loco.net> In-Reply-To: <199805140110.VAA22579@nwalme.pair.com> from Dima Dorfman at "May 13, 98 09:10:29 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Dima Dorfman wrote:
> > Never edit /etc/passwd or master.passwd or [linux] shadow directly.
>
> I have never used any of this tool, vipw. I always just edit
> /etc/master.passwd and do a pwd_mkdb. This eams to work just fine. Also,
> the only real reason I might use chfn is if I don't have root access. Is
> there a reason why I shouldn't edit /etc/master.passwd?
Use of vipw, chfn, passwd, and related tools lock the databases, preventing
problems.:
Suppose root edits master.passwd with vi [no locking].
While root is editing, user changes something with chfn.
User is told "ok" by chfn.
User exits chfn. (chfn runs pwd_mkdb on user's behalf).
Then root exits vi, runs pwd_mkdb --> user's changes disappear.
Had root been using vipw, user would have been told:
[user@box user]# chfn
chfn: the password db file is busy
[user@box user]#
Dave
--
<----. mail-to: djv@bedford.net
<----|===================================
<----' Zber Qnrzbaf, Srjre Qrivyf!
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805140128.VAA08447>
