[erlang-questions] snmp security name problems
Daniel Goertzen
daniel.goertzen@REDACTED
Sat Apr 30 22:21:02 CEST 2011
I am playing with erlang snmp managers, and am having trouble making my
first sync_get() command to a v3 agent work. I am getting
"unknownSecurityName" (see below), and I am stumped as to what might be
wrong.
I have What's Up Gold polling my v3 agent device, so I know the agent's SNMP
is working well.
Any suggestions?
Thanks,
Dan.
PS C:\cygwin\home\goertzen\bulk_config\srpc\ebin> C:\erlang\bin\erl.exe
-config C:\erlsnmp\sys.config
Eshell V5.8.2 (abort with ^G)
1> crypto:start().
ok
2> snmp:start().
ok
3> snmpm:which_agents().
["myagent"]
4> snmpm:which_usm_users().
[{"hemi","abc123"}]
5> snmpm:usm_user_info("hemi", "abc123",sec_name).
{ok,"abc123"}
6> snmpm:sync_get(defaultuser, "myagent", [[1,3,6,1,2,1,1,1]]).
=ERROR REPORT==== 30-Apr-2011::15:15:46 ===
[ snmp : manager : snmpm_mpd : <0.61.0> ]
MPD: CONFIG ERROR: unknownSecurityName (message: {message,'version-3',
{v3_hdr,1261510722,484,
[7],
3,undefined,undefined},
[48,65,4,32,56,48,58,48,48,
58,54,51,58,57,102,58,48,
51,58,48,48,58,52,48,58,53,
51,58,48,56,58,52,102,58,
55,51,4,0,160,27,2,4,92,
103,199,2,2,1,0,2,1,0,48,
13,48,11,6,7,43,6,1,2,1,1,
1,5,0]})
{error,{send_failed,1550305026,unknownSecurityName}}
7>
usm.conf:
%% {EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}.
%% {EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey}.
{"hemi", "abc123", "abc123",
usmHMACMD5AuthProtocol,
[122,254,237,74,242,75,191,73,255,25,189,190,102,250,156,25], % from
snmp:passwd2localized_key(md5,"abc123456","hemi")
usmDESPrivProtocol,
[122,254,237,74,242,75,191,73,255,25,189,190,102,250,156,25] % from
snmp:passwd2localized_key(md5,"abc123456","hemi")
}.
agents.conf:
%% {UserId,
%% TargetName, Comm, Ip, Port, EngineID, Timeout,
%% MaxMessageSize, Version, SecModel, SecName, SecLevel}
%%
{ defaultuser, "myagent", "", [192,168,1,50], 162, "engineid", infinity,
484, v3, usm, "abc123", authPriv }.
users.conf:
{defaultuser, snmpm_user_default, "dummy"}.
manager.conf:
{port, 5000}.
{address, [192,168,1,104]}.
{engine_id, "hemi"}.
{max_message_size, 484}.
sys.config:
[{snmp,
[
{manager,
[
{priority, normal},
{versions, [v3]},
{config, [{dir, "c:/erlsnmp/"}, {verbosity, silence}, {db_dir,
"c:/erlsnmp/data/"}, {repair, true}, {auto_save, 5000}]},
{inform_request_behaviour, auto},
{mibs, ["c:/erlang/lib/snmp-4.18/mibs/SNMPv2-MIB"]},
{server, [{timeout,30000},{verbosity,silence}]},
{note_store, [{timeout,30000},{verbosity,silence}]},
{net_if,
[{module,snmpm_net_if},{verbosity,silence},{options,[{bind_to,false},{no_reuse,false}]}]}
]
}
]
}
].
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110430/a12a5ade/attachment.htm>
More information about the erlang-questions
mailing list