logo       

Re: Safe removal of a user while purging: msg#00205

linux.debian.devel.mentors

Subject: Re: Safe removal of a user while purging

Magnus Ekdahl:

> "...Note, however, that the postrm cannot rely on any non-essential packages
> to be present during the purge phase...." (deluser isn't essential).
> If there aren't any way, is this script safe enough?

Why not just run the regular account deletion, and post an error
message if it fails? That what I do in a similar situation
(lyskom-server):

# Remove 'lyskom' user
userexist=1
getent passwd lyskom > /dev/null || userexist=0
if test "$userexist" = "1"; then
# User did exist
echo 'Removing lyskom user.'
deluser lyskom || echo 'Could not remove lyskom user'
fi

I don't think trying to mess with the things manually is a good idea.
It's not the end of the world if the account remains after purge if a
note has been posted about it, imho.

--
\\//
Peter - I do not read or respond to mail with HTML attachments.
Statement concerning unsolicited e-mail according to Swedish law:
http://www.softwolves.pp.se/peter/reklampost.html


--
To UNSUBSCRIBE, email to debian-mentors-request@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise