Discussion:
Runtime update of SNMPv3 USM User List
Pavan Tatavarthi
2017-01-27 10:50:47 UTC
Permalink
Hello,

Context:

1. A device has local Username / password database

2. On Device init, SNMPv3 USM module is initialized with - 'createUser' token with the corresponding authentication and encryption passwords

3. It should work fine, no doubts here.

4. Net-SNMP base - 5.7.3

Use cases:

1. If the user wishes to change a ONLY PASSWORD in local database for various reasons, once the device is up and running,

is there a possibility to re-initialize only that particular user details in 'userList'


2. If the device admin creates a new SNMP Get user, , once the device is up and running,

is there a possibility to add a new user at the end of the user details in 'userList'



Userlist mentioned above is in snmpusm.c
/*
* Local storage (LCD) of the default user list.
*/
static struct usmUser *userList = NULL;

Solution considered:
Use case1 : Call usm_set_password - for use case 1, as a trigger when the user changes password in the local database
Use case2 : Call usm_parse_config_usmUser / usm_add_user - for use case 2, as a trigger when the admin creates a new user in the local database

Query/Request:

1. Will the solutions work or is there any better way to handle the use cases ?

2. Kindly suggest a way forward for further study, if the solutions does not solve the use cases ?

Thanks,
Pavan
Wes Hardaker
2017-02-23 14:43:33 UTC
Permalink
Post by Pavan Tatavarthi
1. If the user wishes to change a ONLY PASSWORD in local database for various reasons, once the
device is up and running, is there a possibility to re-initialize only
that particular user details in ‘userList’
See the snmpusm command which lets you change a password in a running system.
Post by Pavan Tatavarthi
2. If the device admin creates a new SNMP Get user, , once the
device is up and running, is there a possibility to add a new user at
the end of the user details in ‘userList’ Userlist mentioned above is
in snmpusm.c
Yes, the snmpusm command also allows administrators to create new users
as well to a live system. The snmpd agent will then save the
credentials for any new users or changed users to it's local
configuration storage.
--
Wes Hardaker
Please mail all replies to net-snmp-***@lists.sourceforge.net
Loading...