snmpd postinst fails if user cannot be deleted

Bug #701944 reported by Disconnect
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
net-snmp (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Setting up snmpd (5.4.2.1~dfsg0ubuntu1-0ubuntu2.1) ...
userdel: cannot remove entry 'snmp' from /etc/passwd
/usr/sbin/deluser: `/usr/sbin/userdel snmp' returned error code 1. Exiting.
dpkg: error processing snmpd (--configure):
 subprocess installed post-installation script returned error exit status 1

We use ldap authentication, so deluser fails (correctly, as I don't want packages wandering around screwing up global user/group entries.)

Removing the deluser/adduser block from the postinst (leaving the chown there) works fine.

Related branches

Chuck Short (zulcss)
Changed in net-snmp (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Nathan Stratton Treadway (nathanst) wrote :

I noticed that the proposed branch ( lp:~shuff/ubuntu/precise/net-snmp/fix-for-701944 ) includes a new copy of the line:
  if [ ! `getent passwd snmp >/dev/null` ]; then
(and also leaves the existing "group" line untouched), so I thought it was worth mentioning debbugs #609430, which points out that the combo of backticks and redirection to /dev/null means the expression doesn't work as intended...

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609430

Nathan

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.