Home | Mirror | Search |
neo@debian:~$ sudo /etc/init.d/snmpd stop Stopping network management services: snmpd snmptrapd. neo@debian:~$ sudo net-snmp-config --create-snmpv3-user -ro -a "netadminpassword" netadmin adding the following line to /var/lib/snmp/snmpd.conf: createUser netadmin MD5 "netadminpassword" DES adding the following line to /usr/share/snmp/snmpd.conf: rouser netadmin neo@debian:~$ sudo /etc/init.d/snmpd start Starting network management services: snmpd.
test
neo@debian:~$ snmpget -v 3 -u netadmin -l authNoPriv -a MD5 -A <passwd> 127.0.0.1 sysUpTime.0 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (6342) 0:01:03.42
With a different password this fails:
neo@debian:~$ snmpget -v 3 -u netadmin -l authNoPriv -a MD5 -A nopasswd 127.0.0.1 sysUpTime.0 snmpget: Authentication failure (incorrect password, community or key) (Sub-id not found: (top) -> sysUpTime)
Note that this can be stuck in a snmp.conf file in ~/.snmp:
neo@debian:~$ mkdir ~/.snmp neo@debian:~$ vim ~/.snmp/snmp.conf defSecurityName netadmin defContext "" defAuthType MD5 defSecurityLevel authNoPriv defAuthPassphrase <netadminpassword> defVersion 3
test
neo@debian:~$ snmpget 127.0.0.1 sysUpTime.0 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (39471) 0:06:34.71