Hi Dave,

Now I am registering the tokens using:

    register_config_handler(app, "usmUser",
        usm_parse_config_usmUser, NULL, NULL);

    register_config_handler(app, "createUser",
        usm_parse_create_usmUser, NULL,
        "username [-e ENGINEID] (MD5|SHA) authpassphrase [DES
[privpassphrase]]");

and creating SNMPv3 user using:

        sprintf(buf,"%s -e %s","administrator","0x0102030405");
        strcat(buf," MD5 ");
        strcat(buf,"mypassword");
        usm_parse_create_usmUser(NULL,buf);

But, still I am not able to resolve the issue of
"SNMPERR_USM_UNKNOWNSECURITYNAME", due to which callback is not being
called.

Any help in this regard would be highly appreciated.

Thanks and Regards
Gaurav Chaturvedi

On Tue, Jul 20, 2010 at 7:15 PM, Dave Shield <d.t.shi...@liverpool.ac.uk>wrote:

> On 20 July 2010 14:27, Gaurav Chaturvedi <gauravchaturve...@gmail.com>
> wrote:
> > From this error, I think I am not able to create the user
> > properly. Is it true?
>
> That's what it looks like, yes.
>
>
>
> > Using the documentation, I am using the command:
> >
> > snmpusm -v3 -u initial -n "" -l authNoPriv -a MD5 -A mypassword localhost
> > create administrator initial
>
> That will create a user within the Net-SNMP agent.
> It will have no effect on your private application.
>
>
>
> > I have entered following enteries in ...\snmp\persist\snmpapp.conf:
> >
> > rwuser initial
> > rwuser administrator
> > createUser initial MD5 mypassword DES
> >
> > But the command is giving errors:
> > c:/snmp/snmp/persist/snmpapp.conf: line 17: Warning: Unknown token:
> rwuser.
> > c:/snmp/snmp/persist/snmpapp.conf: line 18: Warning: Unknown token:
> rwuser.
> > c:/snmp/snmp/persist/snmpapp.conf: line 19: Warning: Unknown token:
> createUser.
>
> Have you defined config handlers for these tokens?
>
> The Net-SNMP agent and trap receiver understand them,
> because they have config handler routines for them.
>
> If you are trying to write your own version of snmptrapd,
> then you need to duplicate *ALL* of the necessary functionality.
> Including mechanisms for creating SNMPv3 users.
>
>
>
> > Please correct me where I am wrong.
>
> Personally I think where you are going wrong is in trying to re-write
> an existing tool, rather than taking something that already works,
> and extending it to meet your additional requirements.
>
> Dave
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to