Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.cis.okstate.edu!newsfeed.ksu.ksu.edu!news.physics.uiowa.edu!math.ohio-state.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!newsfeed.internetmci.com!newsxfer2.itd.umich.edu!uunet!inXS.uu.net!nntp.wwwi.com!rtd.com!dgy From: dgy@rtd.com (Don Yuniskis) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Help deleting a user Date: 24 Jun 1996 12:35:43 GMT Organization: CICDO Lines: 35 Message-ID: <4qm22v$35c@baygull.rtd.com> References: <31c5fba8.407993@news.intergate.bc.ca> <4qd73s$id5@primus.ac.net> <4qdlcj$hp1@baygull.rtd.com> <31CDDFAB.780@netaxs.com> NNTP-Posting-Host: seagull.rtd.com In article <31CDDFAB.780@netaxs.com>, Jed Clear <clear@netaxs.com> wrote: >Don Yuniskis wrote: >> >> In article <4qd73s$id5@primus.ac.net>, Mike Shultz <shultz@mail.gld.com> wrote: >> >jordon@intergate.bc.ca (Jordon Randall) wrote: >> > >> >>I know this is a dumb question, but how do you erase a user? >> > >> >man vipw >> >rm -r /usr/home/???? >> >> Actually, >> find / -user joe -print >> will let you see if there's anything else of his (joe's) lying around >> on your system. And, >> find / -user joe -depth -exec rm -df {} \; >> will blindly erase everything of his. There are other variations >> on this theme... > >Disable the user, do the find, then do the delete from /etc/passwd. Again, *I* advocate *not* removing the UID from /etc/passwd (at least not immediately). Rather, disable the login with a bogus password and a "nonexistent" shell. This helps if you have to do a restore later and are wondering just who all those files belonging to UID 123 happen to be! (assuming joe = 123) In general, it's just a nice convenient record keeping mechanism -- in addition to your offline logs. The UID space is pretty big so there's no reason you can't assign new users *different* UIDs instead of recycling an old one... >Also I think find has an option for "unkown" user. "unknown" isn't necessarily "joe" :> You also have to check mail aliases, etc. to be "thorough"...