package snmpd failed to upgrade: userdel: user snmp is currently logged in

Bug #573391 reported by marararam on 2010-05-02
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ubuntu Server papercuts
High
Dustin Kirkland 
net-snmp (Ubuntu)
Medium
Dustin Kirkland 

Bug Description

Binary package hint: update-manager

updating the packages went to 99%, after that a window popped up
"Could not install the upgrades"
The included text ends in
E:/usr/bin/dpkg returned an error code (1)

marararam (marararam) wrote :
marararam (marararam) wrote :

after closing the above posted error window, the next one came up, telling the upgrade was complete, but there where errors, see attachment

marararam (marararam) wrote :

problem seems to be snmpd:

$~> sudo dpkg --configure -a
Setting up snmpd (5.4.2.1~dfsg0ubuntu1-0ubuntu2) ...
userdel: user snmp is currently logged in
/usr/sbin/deluser: `/usr/sbin/userdel snmp' returned error code 8. Exiting.
dpkg: error processing snmpd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 snmpd

Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

Affecting to net-snmp

affects: update-manager (Ubuntu) → net-snmp (Ubuntu)
summary: - upgrade to 10.04 failed
+ package snmpd failed to upgrade: userdel: user snmp is currently logged
+ in
Changed in net-snmp (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
marararam (marararam) wrote :

I was able to get around it.

Looking for what the user snmp was doing I found

$~> ps auxf|grep [s]nmp
snmp 1129 0.0 0.0 10384 296 ? Ss 14:19 0:00 rpc.statd -L

After

$~> sudo /etc/init.d/statd stop

the process was gone and the user 'snmp' did no longer own any process and

$~> sudo dpkg --configure -a

completet without errors.

Thierry Carrez (ttx) wrote :

Affected code:

if [ ! `getent group snmp >/dev/null` ]; then
   deluser --quiet --system snmp
fi

The upgrade only deletes (and recreates) the user if the group "snmp" doesn't exist on the machine. That leaves a window for a system where user snmp exists, group snmp doesn't, and snmpd is running under that user.

Thierry Carrez (ttx) on 2010-06-02
Changed in server-papercuts:
importance: Undecided → High
milestone: none → maverick-alpha-2
status: New → Triaged
Changed in server-papercuts:
assignee: nobody → Dustin Kirkland (kirkland)
Changed in net-snmp (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
Christian Reis (kiko) wrote :

The easy workaround for this problem is just to killall -u snmp before retrying the snmp install. Of course, once you get past that point, you may very well run into bug 589056..

Changed in server-papercuts:
status: Triaged → In Progress
Changed in net-snmp (Ubuntu):
status: Triaged → In Progress
Changed in server-papercuts:
status: In Progress → Fix Committed
Changed in net-snmp (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package net-snmp - 5.4.2.1~dfsg0ubuntu1-0ubuntu4

---------------
net-snmp (5.4.2.1~dfsg0ubuntu1-0ubuntu4) maverick; urgency=low

  * debian/snmpd.postinst: source debconf before doing work, LP: #589056
  * debian/snmp.preinst, debian/snmp.prerm: kill any/all processes owned by
    snmp user before install/uninstall, LP: #573391
 -- Dustin Kirkland <email address hidden> Tue, 22 Jun 2010 14:04:48 -0500

Changed in net-snmp (Ubuntu):
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2010-06-23
Changed in server-papercuts:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers