*BSD News Article 69134


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!asstdc.scgt.oz.au!nsw.news.telstra.net!act.news.telstra.net!imci3!imci2!news.internetMCI.com!newsfeed.internetmci.com!news.mathworks.com!hunter.premier.net!bofh.dot!netaxs.com!bofh.dot!usenet
From: Jed Clear <clear@netaxs.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Removing Users from FreeBSD 2.0
Date: Wed, 22 May 1996 19:53:39 -0400
Organization: Net Access - Philadelphia's Original ISP
Lines: 19
Message-ID: <31A3A903.3404@netaxs.com>
References: <4nvobf$dvu@news.starnet.net>
NNTP-Posting-Host: wyndmoor1-55.slip.netaxs.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.01Gold (Win95; I)

David Schnardthorst wrote:
> 
> What is the easiest way to remove users under FreeBSD 2.0.  Can I just take
> them out of the passwd file, or is there another way?

You can change the password field to * or delete the line in 
/etc/passwd.  Putting in * locks them out and has a few advantages.
	1)  searching out files owned by defunct user. see find(1)
	2)  once you get rid of files, then you can recycle the UID 
		using the *'d entry as a book mark.

Since Unix keeps track of file owner ship by UID, not user name, just
deleting the line in /etc/passwd will eventually give the next user 
ownership of the old files.

I think find has an option to find "unowned" files if you've already 
deleted a few users.

-Jed