*BSD News Article 74685


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.sdsmt.edu!mars.dsu.edu!ivory.dsu.edu!not-for-mail
From: ghelmer@ivory.dsu.edu (Guy Helmer)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Delete User
Date: 25 Jul 1996 18:31:11 -0500
Organization: Dakota State University
Lines: 34
Message-ID: <4t903v$1lc@ivory.dsu.edu>
References: <31F7AA14.6A52@worldgate.com>
NNTP-Posting-Host: ghelmer@ivory.dsu.edu

Kevin Traub <traubk@worldgate.com> writes:

>Whats the full procedure for deleting a user?

Remove the user's crontab (if it exists) with "crontab -u user -r"
Remove any "at" jobs the user has queued (use "atq" to list and
	"atrm" to remove the user's jobs)
Remove the user's password entry with the help of "vipw"
Remove the user's home directory
Remove the user's incoming mail file from /var/mail

Or, install my removeuser Perl script, which can be retrieved from

ftp://ftp.dsu.edu/pub/FreeBSD/ghelmer/removeuser.tar.gz

(if you're adventuresome and have backups, retrieve

ftp://ftp.dsu.edu/pub/FreeBSD/ghelmer/removeuser-2-beta.tar.gz

and let me know how it works for you; this new version removes the
user's crontab, at jobs, and handles symlinks in the path to the
user's home directory)

>And is there a expiry date I can set to control the lenght of 
>time the a new users account is active?

man chpass to see how to edit a user's password entry, where you
can set the expiration date on the account.

>Thanks
>kevin
>traubk@worldgate.com
-- 
Guy Helmer, Dakota State University Computing Services - ghelmer@alpha.dsu.edu