From owner-freebsd-questions Thu May 14 01:02:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA01479 for freebsd-questions-outgoing; Thu, 14 May 1998 01:02:07 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from castor.loco.net (lucy.bedford.net [206.99.145.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA01368 for ; Thu, 14 May 1998 01:01:55 -0700 (PDT) (envelope-from listread@bedford.net) Received: (from listread@localhost) by castor.loco.net (8.8.8/8.8.8) id VAA08447; Wed, 13 May 1998 21:28:56 -0400 (EDT) (envelope-from listread) Message-Id: <199805140128.VAA08447@castor.loco.net> Subject: Re: renaming of usernames and homedirectories In-Reply-To: <199805140110.VAA22579@nwalme.pair.com> from Dima Dorfman at "May 13, 98 09:10:29 pm" To: dima@zwb.net (Dima Dorfman) Date: Wed, 13 May 1998 21:28:56 -0400 (EDT) Cc: djv@bedford.net, freebsd-questions@FreeBSD.ORG Reply-to: djv@bedford.net From: CyberPeasant X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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