Comment 4 for bug 1710579

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ok, got it. To reproduce the problem, before installing the snmpd package you need to have an snmp user with an uid that does not belong in the system user range. Something with an uid higher than 999.

For example:

root@xenial-snmpd-1710579:~# useradd -M snmp
root@xenial-snmpd-1710579:~# id snmp
uid=1001(snmp) gid=1001(snmp) groups=1001(snmp)
root@xenial-snmpd-1710579:~# apt install snmpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
snmpd is already the newest version (5.7.3+dfsg-1ubuntu4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up snmpd (5.7.3+dfsg-1ubuntu4) ...
adduser: The user `snmp' already exists. Exiting.
dpkg: error processing package snmpd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 snmpd
E: Sub-process /usr/bin/dpkg returned an error code (1)