[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2018-05-02 Thread Robie Basak
** Tags removed: server-next server-next-drop

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2018-04-13 Thread Robie Basak
** Tags added: server-next-drop

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2018-02-20 Thread David Britton
** Changed in: net-snmp (Ubuntu)
   Status: Triaged => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-16 Thread Andreas Hasenack
@~its-ashish can you please confirm that your existing snmp user (and
group) have a high uid? Please show:

getent passwd snmp
getent group snmp

Thanks

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-16 Thread Andreas Hasenack
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)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-16 Thread Andreas Hasenack
@~its-ashish can you please confirm that your existing snmp user (and
group) have a high uid? Please show:

getent passwd snmp
getent group snmp

Thanks

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-16 Thread Andreas Hasenack
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)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-15 Thread Andreas Hasenack
The postinst script has guards against adding the user if it exists already:
if [ ! `getent passwd snmp >/dev/null` ]; then

  if [ ! `getent group snmp >/dev/null` ]; then
 # no snmp user & group
 adduser --quiet --system --group --home $SNMPDIR \
 --shell /usr/sbin/nologin snmp
  else
 # no snmp user, but snmp group exists
 adduser --quiet --system --ingroup snmp --home $SNMPDIR \
 --shell /usr/sbin/nologin snmp
  fi

elif [ ! `getent group snmp >/dev/null` ]; then

  # snmp user exists but no snmp group
  addgroup --quiet --system snmp

  # if user is local system user (not LDAP or so), then exec usermod
  # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482041#25
  if [ ! `getent passwd snmp | cut -d':' -f3` -ge 1000 ]; then
mkdir -p $SNMPDIR || true
usermod -d $SNMPDIR -m -g snmp -s /usr/sbin/nologin snmp
  fi

fi


It specifically uses getent to check for an existing user or group, in case 
it's in a remote (networked) database like ldap.

That being said, looks like it's not working:
root@xenial-snmpd-1710579:~# ./postinst.sh 
+ set -e
+ SNMPDIR=/var/lib/snmp
+ getent passwd snmp
+ [ ! ]
+ getent group snmp
+ [ ! ]
+ echo no snmp user and group
no snmp user and group
+ adduser --quiet --system --group --home /var/lib/snmp --shell 
/usr/sbin/nologin snmp


That adduser call doesn't fail, though:
root@xenial-snmpd-1710579:~# adduser --quiet --system --group --home 
/var/lib/snmp --shell /usr/sbin/nologin snmp
root@xenial-snmpd-1710579:~# echo $?
0

Removing --quiet:
root@xenial-snmpd-1710579:~# adduser  --system --group --home /var/lib/snmp 
--shell /usr/sbin/nologin snmp
Warning: The home dir /var/lib/snmp you specified already exists.
The system user `snmp' already exists. Exiting.
root@xenial-snmpd-1710579:~# echo $?
0


This warrants further debugging.

** Bug watch added: Debian Bug tracker #482041
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482041

** Tags added: server-next

** Changed in: net-snmp (Ubuntu)
   Importance: Undecided => Medium

** Changed in: net-snmp (Ubuntu)
   Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-15 Thread Andreas Hasenack
They probably meant for the check to be:

if ! getent passwd snmp >/dev/null

i.e., check exit status ($?).

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-15 Thread Andreas Hasenack
They probably meant for the check to be:

if ! getent passwd snmp >/dev/null

i.e., check exit status ($?).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-15 Thread Andreas Hasenack
The postinst script has guards against adding the user if it exists already:
if [ ! `getent passwd snmp >/dev/null` ]; then

  if [ ! `getent group snmp >/dev/null` ]; then
 # no snmp user & group
 adduser --quiet --system --group --home $SNMPDIR \
 --shell /usr/sbin/nologin snmp
  else
 # no snmp user, but snmp group exists
 adduser --quiet --system --ingroup snmp --home $SNMPDIR \
 --shell /usr/sbin/nologin snmp
  fi

elif [ ! `getent group snmp >/dev/null` ]; then

  # snmp user exists but no snmp group
  addgroup --quiet --system snmp

  # if user is local system user (not LDAP or so), then exec usermod
  # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482041#25
  if [ ! `getent passwd snmp | cut -d':' -f3` -ge 1000 ]; then
mkdir -p $SNMPDIR || true
usermod -d $SNMPDIR -m -g snmp -s /usr/sbin/nologin snmp
  fi

fi


It specifically uses getent to check for an existing user or group, in case 
it's in a remote (networked) database like ldap.

That being said, looks like it's not working:
root@xenial-snmpd-1710579:~# ./postinst.sh 
+ set -e
+ SNMPDIR=/var/lib/snmp
+ getent passwd snmp
+ [ ! ]
+ getent group snmp
+ [ ! ]
+ echo no snmp user and group
no snmp user and group
+ adduser --quiet --system --group --home /var/lib/snmp --shell 
/usr/sbin/nologin snmp


That adduser call doesn't fail, though:
root@xenial-snmpd-1710579:~# adduser --quiet --system --group --home 
/var/lib/snmp --shell /usr/sbin/nologin snmp
root@xenial-snmpd-1710579:~# echo $?
0

Removing --quiet:
root@xenial-snmpd-1710579:~# adduser  --system --group --home /var/lib/snmp 
--shell /usr/sbin/nologin snmp
Warning: The home dir /var/lib/snmp you specified already exists.
The system user `snmp' already exists. Exiting.
root@xenial-snmpd-1710579:~# echo $?
0


This warrants further debugging.

** Bug watch added: Debian Bug tracker #482041
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482041

** Tags added: server-next

** Changed in: net-snmp (Ubuntu)
   Importance: Undecided => Medium

** Changed in: net-snmp (Ubuntu)
   Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1710579] Re: package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status 1

2017-08-14 Thread Apport retracing service
** Tags removed: need-duplicate-check

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1710579

Title:
  package snmpd 5.7.3+dfsg-1ubuntu4 failed to install error exit status
  1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1710579/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs