*BSD News Article 69984


Return to BSD News archive

#! rnews 2221 bsd
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!qns3.qns.com!imci4!newsfeed.internetmci.com!news1.erols.com!newsmaster@erols.com
From: Ken Bigelow <kbigelow@www.play-hookey.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Removing Users from FreeBSD 2.0
Date: Sun, 02 Jun 1996 09:06:29 +0000
Organization: Erols Internet Services
Lines: 30
Message-ID: <31B156D8.41C67EA6@www.play-hookey.com>
References: <4nvobf$dvu@news.starnet.net> <4nvuc8$622@atlas.uniserve.com> <4o1uvb$55j@baygull.rtd.com> <4ooa31$mmu@dfw-ixnews10.ix.netcom.com> <31B093B1.F14@mcs.com> <4or2s6$eq8@mtinsc01-mgt.ops.worldnet.att.net>
NNTP-Posting-Host: kenjb05.play-hookey.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0b4 (X11; I; FreeBSD 2.1.0-RELEASE i386)

Takafumi Kamiya wrote:
> 
> >How did you remove the entry?  Was it w/ vi or some other editor?  In
> >that case I don't believe it will have the desired effect.  What you
> >want is to run 'vipw' and delete the user that way.
> >
> >Eli
> 
> Yes, I used vi and deleted entry from passwd and master.passwd.  I did see
> passwd.db file, but I didn't know what to do with it.
> 
> I used vipw and now the user is deleted clean.  Thank you for your tip!!  But
> then what are passwd and passwd.master there for if you have a separate
> database?  For compatibility?

One need for having the passwd files is so that root can easily see who does or
does not live on the system. More importantly, however, the text files are the
original files actually edited by such programs as vipw and chpass. This makes it
easy to delete or modify information and make sure it is done correctly. Such
programs verify correct data format so you don't completely zap the pwd.db file
by hitting the wrong key at a critical moment.

These programs end by calling pwd_mkdb(8) to complete the update to the hashed
database file.

Any shortcut procedure will make it too easy to place an error in the pwd.db
file, such that perhaps root login is no longer possible. As you will find
elsewhere in this newsgroup, that's already easy enough to do!

Ken