SNMP++ V3 - USM userName Query
Jochen Katz
katz____agentpp.com
Tue May 27 23:25:21 CEST 2003
Hi,
> If two SNMP V3 agents have the same USM userName, but different
> passwords, then I am faced with a problem.
yes, as this is not the standard way.
> In the SNMP Manager, when I call add_usm_user API on the USM object,
> the first entry for Agent1 is replaced by the entry for Agent2. This
> is because UserName is the same.
This is intended, as otherwise the USM does not know which password to
use to create localized keys.
> Can I based on the two agents' EngineID differentiate between the two
> agents? I request you to kindly inform me of the APIs that can be
> made use of.
Yes, if you know the engineID of the agents, you could use
USM::add_localized_user(). As this method requires the localized key
(not the password) you will have to use AuthPriv::password_to_key_XXX()
to create the keys.
Search "add a new user:" in usm_v3.cpp for an example.
Regards,
Jochen
More information about the AGENTPP
mailing list