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.
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.