Multiple Users with same security parameters

Hello,

I declared 2 users in my agent. Both users have the same auth-protocols and private protocols. They have different names and passwords.
I have an issue with one of the two users :
Get/Set requests return response only for one of the users (user1).
Requests using the user2 get an error (security_name unknown).
Is it possible to have more than one user with the same : security_level, auth protocol and private protocol ?
If no, how can we declare multiple users that share common security parameters (level, protocols, …) ?

Thanks for your support
Regards

Code of MyAgent:
…
protected void addUsmUser(USM usm) {
// the security name of the user (typically the user name).
OctetString user1= new OctetString(“usertest1”);
OctetString user2= new OctetString(“usertest2”);
// Passphrase
OctetString passphrase = new OctetString(“PassPassword1”);

	UsmUser user = new UsmUser(**user1**, AuthMD5.ID, passphrase , PrivDES.ID, passphrase );
	usm.addUser(**user1**, usm.getLocalEngineID(), user);

            user = new UsmUser(**user2**, AuthMD5.ID, passphrase , PrivDES.ID, passphrase 
            usm.addUser(**user2**, usm.getLocalEngineID(), user);|
}

Hello Michael,

Of course you can have more than one user with different security names but same security settings.
No problem at all. In your case, the issue must be something different.
Please see also the FAQ at:
https://doc.snmp.app/pages/viewpage.action?pageId=1441800

Best regards,
Frank

1 Like

Hello Frank,

Thanks for your support.

The FAQ discusses the use case when an snmp client has to discuss with several SNMP agents (different engineId) using the same security name and the same security settings.

In my case, it’s a different scenario, I have ONLY one SNMP agent with a list of users (different security names BUT same security settings : passphrase, auth protocol, priv protocol, security level).

To be simple, I have two users : user1 and user2 (configured with the same procedure on SNMP agent)

From an SNMP client:
When I use the user1 to request the SNMP agent : the result is OK
However when I use user2 as security name, the response is PDU report (unknown security name, unknown engineID)

Any idea will be appreciated to fix this issue.
Thanks
Regards
Michel

Hi Michael,

I understood your scenario, but since you get an error, something in your configuration must be wrong. I guess, it is related to engine ID stuff. Maybe you did not specify the correct (local) engine ID for the second user?
Or do you mix up the error message of the client with an error of the command responder? Because maybe the command sender does not know “user2”? (But because you wrote, a REPORT PDU is receiver, it is rather an issue on the command responder)

Best regards,
Frank