|
Re: Safe removal of a user while purging: msg#00201linux.debian.devel.mentors
* Magnus Ekdahl | I'm trying to remove the clamav user when purging the clamav package. The | user clamav is created in postinst using: Why are you removing that user? | case "$1" in | purge) | TMPFILE=`tempfile` | chown root:root $TMPFILE | chmod 600 $TMPFILE | | sed 's/clamav:!:[0-9]*:[0-9]*:[0-9]*:[0-9]*::://' /etc/shadow > $TMPFILE | sed '/^$/d' $TMPFILE > /etc/shadow | | sed 's/clamav:x:[0-9]*:[0-9]*::\/var:\/bin\/false//' /etc/passwd > $TMPFILE | sed '/^$/d' $TMPFILE > /etc/passwd | | rm $TMPFILE | ;; | remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | ;; | *) | echo "postrm called with unknown argument \`$1'" >&2 | exit 0 | esac This will grant you a serious or grave bug. Don't mess with /etc/{passwd,shadow} directly -- that will break if people use something like ldap for handling those files. -- Tollef Fog Heen ,''`. UNIX is user friendly, it's just picky about who its friends are : :' : `. `' `- -- 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> |
|---|---|---|
| Previous by Date: | Safe removal of a user while purging: 00201, Magnus Ekdahl |
|---|---|
| Next by Date: | Sponsor requested for RDF tools - libraptor parser library: 00201, Dave Beckett |
| Previous by Thread: | Safe removal of a user while purgingi: 00201, Magnus Ekdahl |
| Next by Thread: | Re: Safe removal of a user while purging: 00201, Magnus Ekdahl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |