From owner-freebsd-questions@FreeBSD.ORG Wed Feb 4 10:05:06 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8140516A4CE for ; Wed, 4 Feb 2004 10:05:06 -0800 (PST) Received: from mail.vjs.org (achilles.vjs.org [209.163.107.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBBEC43D1D; Wed, 4 Feb 2004 10:05:04 -0800 (PST) (envelope-from vince@vjs.org) Received: from [68.24.1.250] (209.163.107.229) by mail.vjs.org with ESMTP (Eudora Internet Mail Server 3.1.4); Wed, 4 Feb 2004 12:44:30 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <44n07zvsay.fsf@be-well.ilk.org> References: <44n07zvsay.fsf@be-well.ilk.org> X-Mailer: Eudora 8.0b19 for Cray SV-2 (beta release), unregistered Date: Wed, 4 Feb 2004 12:43:34 -0500 To: freebsd-questions@freebsd.org From: Vince Sabio Cc: freebsd-questions@freebsd.org Content-Type: text/plain; charset="us-ascii" ; format="flowed" Subject: Re: Cannot Add User X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2004 18:05:06 -0000 ** Sometime around 09:21 -0500 02/04/2004, Lowell Gilbert sent everyone: >Vince Sabio writes: > >[...] > > I'm now trying to install Postfix, and the problem I'm running into is >> that I cannot create new user accounts. I created several user >> accounts during installation, and they seem to be fine. But when I >> [manually] create entries in /etc/passwd, master.passwd, and group, >> the entries are 'ignored' -- e.g., a "chown [newuser] [filename]" >> command fails, attempts to su from root into the user account fail, >> etc. When I try to create the user via adduser (using the standard >> defaults), the account creation step fails with the following error: >> > > pw: user '[newuser]' disappeared during update > >It sounds like you've messed up your user database. Try running >pwd_mkdb(8) by hand to get it straightened out. In future, remember >not to edit passwd and so forth by hand; stick with adduser(8) and/or >vipw(8) to avoid shooting yourself in the foot like this. I have to wonder if this is unique to the BSDs; I've been using Solaris for nearly a decade now, and the _only_ way I've ever created user accounts is manually -- by editing /etc/passwd, shadow, and group files, creating user directories, etc. I've never had a problem with it before. (I'm pretty sure I've done the same under Linux, too.) Running adduser is fine for simple user accounts -- but there are few user accounts on a typical server. The problem with adduser is that it isn't well suited to things like accounts with no home directories or login shells, disabled passwords (not the same as a locked account), etc. Either way, I tried running pwd_mkdb -C /etc/passwd, and it reported a format error on line 3 -- which happens to be the root account, and is the first real data line in the file. Moreover, it's a line that I didn't modify. It reported no errors on /etc/master.passwd, so I copied and modified it into a passwd file -- and pwd_mkdb then reported no errors on the new passwd file. However, that action also prevented any new logins, and running passwd didn't fix the problem. So, after mucking around with pwd_mkdb for a while, I opted to simply reinstall the OS -- it was still a rather new installation, and I wanted to increase the /usr partition, anyway. After completing the new FreeBSD installation, the first thing I did upon logging in was run pwd_mkdb on /etc/passwd, and it still reported a format error on line 3. I then manually added the necessary users, and this time the postfix installation ran to completion. While it's possible that I messed up the format on the original try, it's unlikely -- I checked it over a dozen times before going in search of a FreeBSD list on which to ask the question. I'm thinking that there might have been something else in the mix. But either way, the clean install fixed it (though admittedly it was a rather Draconian fix). -- __________________________________________________________________________ Vince Sabio vince@vjs.org