Thank you Dave for shedding some light on this. I'm sorry for my persistent but I need to understand this.
I'm using net-snmp 5.4.2.1 version on linux. I read the docs, manual pages, looked at library snmpusm.c and snmpusm.c code in apps dir but I can't make -m option work. I type: snmpusm -v3 localhost -l authNoPriv -u initialuser1 -A passwd1 create user1 initialuser1 This works and the user is created since the clone from "initialuser1" user is in persistent snmpd.conf file. Then I use the snmpusm command to change the inherited password from cloneFrom user. I want to supply an already (MD5) hashed value instead of clear text passphrase so I use: snmpusm -v3 -l authNoPriv -u user1 -A passwd1 passwd -Ca passwd1 -m 0x<hexkey> The snmpusm command returns error : New passphrase must be greater than 8 characters in length I don't know if -m option is intended to be used with MD5 hashed value?? I noticed the manual pages for snmpcmd refers to -m as -3m and so does the snmpv3.c code. So I used -3m option instead but that did the same as above. I don't know if this is the best way to create a new user other than writing program and creating netsnmp session and pdu to talk to the agent. Is it always required to create the user first and then change the password or it can be done in one step? I still prefer at the moment to use the snmpusm command to create the user with my own hashed password. If anyone knows how to, please let me know Thanks, Bernadette -----Original Message----- From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf Of Dave Shield Sent: Wednesday, February 10, 2010 1:15 AM To: EYRE Bernadette Cc: net-snmp-coders@lists.sourceforge.net Subject: Re: create SNMPv3 user with hashed password On 10 February 2010 02:45, EYRE Bernadette <bernadette.e...@alcatel-lucent.com> wrote: > Hello Dave, Please address queries to the list as a whole - not to me personally. I am *not* the sole support for this project (though it sometimes feels like it!) > Is it possible to create snmpv3 user with hashed password rather than > clear text and provide the appropriate hash algorithm type? $ man snmpd.conf SNMPv3 Users If you want to generate either your master or localized keys directly, replace the given password with a hexstring (preceeded by a "0x") and precede the hex string by a -m or -l token (respectively). > If so which api to use? All creation of SNMPv3 users eventually boils down to a call to: usm_add_user() > Any examples? See 'usm_parse_create_usmUser()' in snmplib/snmpv3.c Dave ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders