[Pkg-net-snmp-devel] Bug#606784: snmpd: package fails to upgrade properly from lenny

Jonathan Wiltshire jmw at debian.org
Sat Dec 18 22:50:24 UTC 2010

(dropping the submitter, there's a deeper problem here)

On Sat, Dec 18, 2010 at 11:01:22PM +0100, Julien Cristau wrote:
> the postinst does:
> if [ "x$1" = xconfigure ]; then
>         if [ ! `getent group snmp >/dev/null` ]; then
>                  deluser --quiet --system snmp
>         fi
>         adduser --quiet --system --group --no-create-home --home /var/lib/snmp snmp
>         chown -R snmp:snmp /var/lib/snmp
> fi
> Which seems pretty weird.  What is this trying to do?

Mmm, I hadn't dug this far. As it's not my package I've no idea what the
intention was, but the call to adduser first appears in the Lenny package
without a --group option, so the system user gets added to nogroup. This
looks like an attempt to give the snmp user an snmp group if that's the
case. Indeed, r286 and r293 in SVN, and bug #520724 seem to back this up.

Being a bit green at this sort of thing, is this neccessary to ensure the
user and group have the same ID or is it acceptable to:
 - move the call to adduser above the test, which will fail gracefully if
   the user already exists
 - then test for the presence of a group snmp
 - if there isn't, create it and add the user to it?


Jonathan Wiltshire                                      jmw at debian.org
Debian Developer                         http://people.debian.org/~jmw

4096R: 0xD3524C51 / 0A55 B7C5 1223 3942 86EC  74C3 5394 479D D352 4C51
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-net-snmp-devel/attachments/20101218/cf27f812/attachment.pgp>

More information about the Pkg-net-snmp-devel mailing list