diff options
author | elie <elie> | 2013-01-05 14:15:37 +0000 |
---|---|---|
committer | elie <elie> | 2013-01-05 14:15:37 +0000 |
commit | 0629ac3bca6038a1abedbd50290574f8332f2de8 (patch) | |
tree | 7811d243df88d5e2144a77209a3b1d8e6faae8de | |
parent | f57859a0d14d27cf5508d46fcbf17574129c0d25 (diff) | |
download | pysnmp-0629ac3bca6038a1abedbd50290574f8332f2de8.tar.gz |
another USM user added to make this script working with the client ones
-rw-r--r-- | examples/v3arch/manager/ntfrcv/v3-multiple-users.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/v3arch/manager/ntfrcv/v3-multiple-users.py b/examples/v3arch/manager/ntfrcv/v3-multiple-users.py index a41fecf..94627e8 100644 --- a/examples/v3arch/manager/ntfrcv/v3-multiple-users.py +++ b/examples/v3arch/manager/ntfrcv/v3-multiple-users.py @@ -6,6 +6,7 @@ # * SNMPv3 # * with USM users: # 'usr-md5-des', auth: MD5, priv DES, ContextEngineId: 8000000001020304 +# 'usr-md5-none', auth: MD5, priv NONE, ContextEngineId: 8000000001020304 # 'usr-sha-aes128', auth: SHA, priv AES, ContextEngineId: 8000000001020304 # * over IPv4/UDP, listening at 127.0.0.1:162 # * print received data on stdout @@ -14,6 +15,7 @@ # receiver: # # $ snmptrap -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 -e 8000000001020304 127.0.0.1 123 1.3.6.1.6.3.1.1.5.1 +# $ snmptrap -v3 -u usr-md5-none -l authPriv -A authkey1 -e 8000000001020304 127.0.0.1 123 1.3.6.1.6.3.1.1.5.1 # $ snmpinform -v3 -u usr-sha-aes128 -l authPriv -a SHA -A authkey1 -x AES -X privkey1 127.0.0.1 123 1.3.6.1.6.3.1.1.5.1 # from pysnmp.entity import engine, config @@ -52,6 +54,20 @@ config.addV3User( contextEngineId=v2c.OctetString(hexValue='8000000001020304') ) +# user: usr-md5-none, auth: MD5, priv NONE +config.addV3User( + snmpEngine, 'usr-md5-none', + config.usmHMACMD5AuthProtocol, 'authkey1' +) + +# user: usr-md5-none, auth: MD5, priv NONE, contextEngineId: 8000000001020304 +# this USM entry is used for TRAP receiving purposes +config.addV3User( + snmpEngine, 'usr-md5-none', + config.usmHMACMD5AuthProtocol, 'authkey1', + contextEngineId=v2c.OctetString(hexValue='8000000001020304') +) + # user: usr-sha-aes128, auth: SHA, priv AES config.addV3User( snmpEngine, 'usr-sha-aes128', |