I have a unix machine where is configured snmptrapd. The configuration on /etc/snmp/snmptrapd.conf is the following
createUser -e 0x8000000001020304 USRSNMPV3NET SHA "mypwd" AES "mypwd2"
authUser log,execute,net USRSNMPV3NET
# Format logs for collection by Azure Monitor Agent
format2 snmptrap %a %B %y/%m/%l %h:%j:%k %N %W %q %T %W %v \n
I configured the process to run with debug, and i can see the trap arriving. The issue is that i get this error
trace: usm_get_user_from_list(): snmpusm.c, 3699:
usm: match on user USRSNMPV3NET
trace: usm_get_user_from_list(): snmpusm.c, 3705:
usm: no match on engineID (80 00 30 44 04 38 30 30 30 30 30 30 30 30 31 30
32 30 33 30 34 )
trace: usm_get_user_from_list(): snmpusm.c, 3699:
usm: match on user USRSNMPV3NET
trace: usm_get_user_from_list(): snmpusm.c, 3705:
usm: no match on engineID (80 00 30 44 04 38 30 30 30 30 30 30 30 30 31 30
32 30 33 30 34 )
trace: usm_get_user_from_list(): snmpusm.c, 3699:
usm: match on user USRSNMPV3NET
trace: usm_get_user_from_list(): snmpusm.c, 3705:
usm: no match on engineID (80 00 30 44 04 38 30 30 30 30 30 30 30 30 31 30
32 30 33 30 34 )
trace: usm_process_in_msg(): snmpusm.c, 2561:
usm: Unknown User(USRSNMPV3NET)
trace: snmpv3_parse(): snmp_api.c, 3955:
dumph_recv: ScopedPDU
trace: _snmp_parse(): snmp_api.c, 4364:
unknown security name (no such user exists)
trace: _snmp_parse(): snmp_api.c, 4364:
snmp_parse: Parsed SNMPv3 message (secName:USRSNMPV3NET, secLevel:authPriv): USM
unknown security name (no such user exists)
The trap is arriving with the correct engineID
trace: usm_parse_security_parameters(): snmpusm.c, 2017:
dumph_recv: msgAuthoritativeEngineID
dumpx_recv: 04 17 80 00 30 44 04 30 78 38 30 30 30 30 30 30
30 30 31 30 32 30 33 30 34
dumpv_recv: String: ..0D.0x8000000001020304
trace: usm_parse_security_parameters(): snmpusm.c, 2040:
dumph_recv: msgAuthoritativeEngineBoots
dumpx_recv: 02 04 63 E6 30 4D
dumpv_recv: Integer: 1676030029 (0x63E6304D)
trace: usm_parse_security_parameters(): snmpusm.c, 2064:
dumph_recv: msgAuthoritativeEngineTime
dumpx_recv: 02 03 1A 4D 18
dumpv_recv: Integer: 1723672 (0x1A4D18)
trace: usm_parse_security_parameters(): snmpusm.c, 2092:
dumph_recv: msgUserName
dumpx_recv: 04 0C 55 53 52 53 4E 4D 50 56 33 4E 45 54
dumpv_recv: String: USRSNMPV3NET
trace: usm_parse_security_parameters(): snmpusm.c, 2135:
dumph_recv: msgAuthenticationParameters
dumpx_recv: 04 0C 94 0D CE 2D 62 3E 63 CF 69 03 E6 FE
dumpv_recv: String: .^M.-b>c.i...
trace: usm_parse_security_parameters(): snmpusm.c, 2164:
I've tried to change sender EngineID and configuration, change the user, change the engine id type of the sender from TEXT to HEX, but nothing worked.