net-snmp-config --create-snmpv3-user in global zone fails when snmpd running
in non-global zone:
global# net-snmp-config --create-snmpv3-user -ro -a "testpas" testuser
Apparently at least one snmpd demon is already running.
You must stop them in order to use this command.
global#
snmpd is not running in global zone but is running in non-global zone:
global# ps -efZ
...
s10zone root 2612 1 0 16:12:52 ? 0:00
/usr/sfw/sbin/snmpd
Error reported by this code in /usr/bin/net-snmp-config
...
--create-snmpv3-user)
if /usr/bin/ps -e | egrep ' snmpd *$' > /dev/null 2>&1 ; then
echo "Apparently at least one snmpd demon is already running."
echo "You must stop them in order to use this command."
exit 1
fi
I have attached the patch which fixes this issue.
I raised a similar issue for FreeBSD and have referenced this issue from there:
https://github.com/net-snmp/net-snmp/issues/280