Hi Larry,
Thanks for the reply. I'm able to create users using the snmpusm
command but can only use them after adding their details to the config
file. Our config file is generated at runtime by an application which
will add an access line for each user that it can read from the
persistent storage. But to trigger this application we must stop and
start snmp via our GUI, replicating the behaviour described in the
'CREATING A SECOND USER' section in
https://net-snmp.sourceforge.io/docs/README.snmpv3.html.

My aim is to automate this if possible. So when for example a new user
is created, we somehow detect this and restart our application which
will stop Net-SNMP, create the user access controls lines and then
restart Net-SNMP.

Another thing that I'm wondering if it is possible is to have a more
generic setup in the configuration to setup the access control,
however I'm not sure if I can make use of authgroup without using
authuser.

Thanks again for your help,
CK

On Thu, 24 Jun 2021 at 18:05, Larry Hayes <lhay...@gmail.com> wrote:
>
> I am more of a user of the net-snmp library so take what I say with 
> skepticism.
>
> The snmpusm should be updating the usmUserTableby sending messages to the 
> snmpd to do the work.
> You can query this table to verify that the users are created in it.
> Once in this table, I would suspect that these users are available for use 
> and no restart of the snmpd is needed.
>
> When the snmpd is stopped it will update the persistent snmpd.conf file with 
> the users from the usmUserTable.
> The purpose of doing this is so on the next startup it can recreate the 
> usmUserTable.
>
> I would find it very interesting if the snmpd needs to restart to start using 
> V3 users created via snmpusm.
>
> What type of failure are you encountering?
> Have you set up the user's access control?
>
> Access control can be done in the non-persistent snmpd.conf files and usually 
> a SIGHUP will do the trick to get snmpd to reread these files.
>
>
> On Thu, Jun 24, 2021 at 2:19 AM Code Kipper <codekip...@gmail.com> wrote:
>>
>> Hi all,
>>
>> We have an application which generates the common configuration file
>> for snmpd based on user settings and manages the snmpd and snmptrapd
>> services.
>>
>> Currently, we're able to clone and manage v3 users via snmpusm but to
>> use them we must shutdown snmpd so that the persistent snmpd.conf file
>> is updated and then restart our application. This regenerates the
>> common configuration file with the correct access control and starts
>> snmpd.
>>
>> Our aim is to make this seamless but I'm not sure if this is possible.
>> If, for example, if the snmpd.conf file was updated as soon as these
>> table settings were modified then we could monitor that and then
>> restart everything. I've skimmed the library functions but don't see
>> anything that could provide notifications based on user changes.
>>
>> Is what I'm trying to do possible?,
>>
>> Thanks in advance,
>> CK
>>
>>
>> _______________________________________________
>> Net-snmp-coders mailing list
>> Net-snmp-coders@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to