I didn't answer to this and now I understand the Wes answer context. 

This aspect may resolve the problem with the initial user password change but 
it creates another problem. The problem with the cloned users that RFC 
specifies. I cannot comment out the if(uptr->cloneFrom) because it creates an 
exception to the RFC.

Now I understood. Thanks very much,
Sérgio Cabaço

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf 
Of Dave Shield
Sent: sábado, 21 de Fevereiro de 2009 10:37
To: Sergio Cabaço; Wes Hardaker
Cc: [email protected]
Subject: Re: Changing password first boot 5.3.2

   [ I'm restricting this followup to -coders, since this is
definitely a coding issue.]

2009/2/20 Sergio Cabaço <[email protected]>:
>  I can create the user [in /var/net-snmp/snmpd] ...
> but when I try to send a snmpusm...passwd it doesn't
> like and returns me an error:
>
> Error in packet.
> Reason: inconsistentName (That object can not currently be created)
> Failed object: SNMP-USER-BASED-SM-MIB::usmUserAuthKeyChange.".....
>
> When the agent is restarted, and I try to do the same thing, the keys are 
> changed (successfully).

OK - I've done some more investigation this morning, and the culprit appears
to be the following:

agent/mibgroup/snmpv3/usmUser.c:write_usmUserAuthKeyChange()

    ... if (action == ACTION) {
        :
        if (uptr->cloneFrom == NULL) {
            return SNMP_ERR_INCONSISTENTNAME;
        }
        :
    }

(probably around line 855)
If this check is commented out, the  "snmpusm ... passwd" command
succeeds, even with a "createUser" line in /var/net-snmp/snmpd.conf

With this check in place, the "snmpusm .. passwd" command fails
with "createUser", but succeeds with "usmUser".

Wes - can you shed any light on what might be happening here?

Dave

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to