snmpd postinst fails if user cannot be deleted
Bug #701944 reported by
Disconnect
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.
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
lp://staging/~shuff/ubuntu/precise/net-snmp/fix-for-701944
Ready for review
for merging
into
lp://staging/ubuntu/precise/net-snmp
- Ian Hayton: Pending requested
-
Diff: 89 lines (+33/-14)4 files modifieddebian/changelog (+9/-0)
debian/control (+1/-1)
debian/snmpd.postinst (+9/-3)
debian/snmpd.postrm (+14/-10)
Changed in net-snmp (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
To post a comment you must log in.
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