On Sat, Dec 18, 2010 at 22:50:24 +0000, Jonathan Wiltshire wrote: > (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? > Not just add the user to it, but set it as the user's initial group. So 'usermod -g snmp snmp' or so.
Cheers, Julien
signature.asc
Description: Digital signature