[SNMP4J] null in authPassPhrase..even though initialized user to "authUser"

Rajesh Reddy rajeshreddy at tataelxsi.co.in
Fri May 12 05:47:13 CEST 2006


Hi,
Agent simulator is configured with authUser with the authentication password
of authUser.
when i am sending request to that simulator in other machine ...it is
returning usmuser unknown.
Then i varified the usm user name it is sending, user name is Correct ,but
the authpassphrase is null.
If i send the same request with noauth protocol then it is working fine (as
for noauth passphrase is null).
but with authentication protocol and private protocol it is returning
unknown User as it is sending null in both the passphrases.

is there any other way to set passphrase? (other than initializing through
constructor) or how can i get the response from the agent by using
authentication through snmp4j.

Regards,
Rajesh.

-----Original Message-----
From: Frank Fock [mailto:fock at agentpp.com]
Sent: Friday, May 12, 2006 4:55 AM
To: Rajesh Reddy
Cc: snmp4j at agentpp.org
Subject: Re: [SNMP4J] null in authPassPhrase..even though initialized
user to "authUser"


Hi Rajesh,

The behavior is intended. The returned UsmUserEntry
represents a localized user. Therefore the contained
UsmUser class does not contain any passphrases.

Why do you think that you need any help here?
In other words, what are you trying to accomplish?

Best regards,
Frank

Rajesh Reddy wrote:
> Hi,
>
> I am getting null while displaying the UsmUSer object in the
authPassPhrase
> and PrivPassPhrase..
>
> please see the sample code
>
> TransportMapping transport = new DefaultUdpTransportMapping();
>      Snmp snmp = new Snmp(transport);
>      byte[] b=MPv3.createLocalEngineID();
>      MPv3 mpv3 =
>
(MPv3)snmp.getMessageProcessingModel(MessageProcessingModel.MPv3);
>
> USM usm = new USM(mpv3.getSecurityProtocols().getInstance(),
>                 new OctetString(b), 1);
>
>      SecurityModels.getInstance().addSecurityModel(usm);
>
> UsmUser user1=new UsmUser(new OctetString("privUser"),
>           AuthMD5.ID,
>           new OctetString("authUser".getBytes()),
>           PrivDES.ID,
>           new OctetString("privUser")
>     );
>
>      System.out.println("passphrase:"+user1.getPrivacyPassphrase());
> //////Output:passphrase:privUser
>
>      snmp.getUSM().addUser(new OctetString("privUser"),user1);
> System.out.println(snmp.getUSM().getUser(new OctetString(b),new
> OctetString("privUser")));
> /////Output:
>
UsmUserEntry[userName=privUser,usmUser=UsmUser[secName=privUser,authProtocol
>
=1.3.6.1.6.3.10.1.1.2,authPassphrase=null,privProtocol=1.3.6.1.6.3.10.1.2.2,
> privPassphrase=null]]
>
> UsmUserEntry user=snmp.getUSM().getUser(new OctetString(b),new
> OctetString("privUser"));
>
> UsmUser user2=user.getUsmUser();
> System.out.println("pass:"+user2.getPrivacyPassphrase());  /////////Output
> is :        pass:null
>
>
> Help me to get out of it
> Thanks in Advance
>
> regards,
> Rajesh.
>
>
> ------------------------------------------------------------------------
>
> The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)and
may contain confidential or privileged information. If you are not the
intended recipient, please notify the sender or
administrator at tataelxsi.co.in
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or administrator at tataelxsi.co.in



More information about the SNMP4J mailing list