v3 tool commands
Jochen Katz
katz____agentpp.com
Tue Apr 17 20:57:59 CEST 2001
Hi,
> including v3. I can successfully do mib walks and
> use snmpGet, the tools included with snmp++, but only with
> snmp versions 1 and 2.
> What is the syntax to
> (1) set up a new user in V3 from the command line or agent code
> and (2) the syntax used in an snmpGet -v3 command?
for command line, see the attached file; for agent code, see the
examples of agent++.
Best regards,
Jochen
-------------- next part --------------
# Note: - 14.128.0.19.112.5.118.111.121.97.103.101.114.18.92 is the Oid
# encoding of the engineID. Replace with the right value
# - User MD5 must not exist
# - Access entries for user MD5 must exist
######################
# UCD-snmp version: 4.1.1
#####################
# Create a new row for user MD5
snmpset -v3 -p 4700 -l authNoPriv -u MD5DES -a MD5 -A MD5DESUserAuthPassword -x DES -X MD5DESUserPrivPassword localhost snmpModules.15.1.2.2.1.13.14.128.0.19.112.5.118.111.121.97.103.101.114.18.92.\"MD5\" i 5
# Set clone from of user MD5 to MD5DES
snmpset -v3 -p 4700 -l authNoPriv -u MD5DES -a MD5 -A MD5DESUserAuthPassword -x DES -X MD5DESUserPrivPassword localhost snmpModules.15.1.2.2.1.4.14.128.0.19.112.5.118.111.121.97.103.101.114.18.92.\"MD5\" o .1.3.6.1.6.3.15.1.2.2.1.3.14.128.0.19.112.5.118.111.121.97.103.101.114.18.92.6.77.68.53.68.69.83
# make row active
snmpset -v3 -p 4700 -l authNoPriv -u MD5DES -a MD5 -A MD5DESUserAuthPassword -x DES -X MD5DESUserPrivPassword localhost snmpModules.15.1.2.2.1.13.14.128.0.19.112.5.118.111.121.97.103.101.114.18.92.\"MD5\" i 1
# change auth password of user MD5
# to chane priv password change
# KeyChange(&snmp, pduKeyChange, newUser, newPassword, *target, AUTHKEY);
# to
# KeyChange(&snmp, pduKeyChange, newUser, newPassword, *target, PRIVKEY);
# iin snmpPasswd.cpp
../../../../snmp++/consoleExamples/snmpPasswd localhost MD5 testingtesting -v3 -p4700 -snMD5 -md5 -des -uaMD5DESUserAuthPassword -upMD5DESUserPrivPassword
# test
../../../../snmp++/consoleExamples/snmpNext localhost 1.3 -v3 -v3 -p4700 -snMD5 -md5 -des -uatestingtesting -upMD5DESUserPrivPassword
#############################
# with snmp++ consoleExamples
#############################
#create new row
snmpSet2 localhost 1.3.6.1.6.3.15.1.2.2.1.13.14.128.0.19.112.5.118.111.121.97.103.101.114.18.92.3.77.68.53 -v3 -p4700 -snMD5DES -md5 -des -uaMD5DESUserAuthPassword -upMD5DESUserPrivPassword
New value (two times): 5
# clone
snmpSet localhost 1.3.6.1.6.3.15.1.2.2.1.4.14.128.0.19.112.5.118.111.121.97.103.101.114.18.92.3.77.68.53 -v3 -p4700 -snMD5DES -md5 -des -uaMD5DESUserAuthPassword -upMD5DESUserPrivPassword
New value: 1.3.6.1.6.3.15.1.2.2.1.3.14.128.0.19.112.5.118.111.121.97.103.101.114.18.92.6.77.68.53.68.69.83
# activate
snmpSet localhost 1.3.6.1.6.3.15.1.2.2.1.13.14.128.0.19.112.5.118.111.121.97.103.101.114.18.92.3.77.68.53 -v3 -p4700 -snMD5DES -md5 -des -uaMD5DESUserAuthPassword -upMD5DESUserPrivPassword
New value: 1
# change auth password
snmpPasswd localhost MD5 testingtesting -v3 -p4700 -snMD5 -md5 -des -uaMD5DESUserAuthPassword -upMD5DESUserPrivPassword
# test
snmpNext localhost 1.3 -v3 -v3 -p4700 -snMD5 -md5 -des -uatestingtesting -upMD5DESUserPrivPassword
More information about the AGENTPP
mailing list