I also create V3 users with the procedure you indicate.
When you stop snmpd, it writes the persistence file.
So you cannot edit that file while snmpd is running.
The procedure that works for me:
1) Stop snmpd
2) Wait for PID of snmpd to go away, if you have a large number of V3
users, it lengthens the time for the snmpd to write the persistence file.
3) Start snmpd



On Sun, Sep 12, 2021 at 9:02 AM Saleem <salimmalik...@gmail.com> wrote:

> Hi
> I am using net-snmp v 5.8 version in a custom Linux setup. I have
> configured a V3 user by following the below steps.
>
> 1. Update the createUser directive in persistent snmpd conf file
> (var/net-snmp/snmpd.conf in my system)
> createUser  testsnmpv3user  SHA  TestAuth123p  AES128 Testpriv123p
> 2. stop the snmpd process with #kill <snmppid>
> 3.start snmpd
>
> After starting snmpd, the createUser entry is removed from
> /vare/net-snmp/snmpd.con file and also the corresponding usmUser entry with
> localized keysis not created.
> I see snmpd is not recognizing the added createUsert line in the
> persistent file.
> snmpwalk is falling with "USM unknown security name (no such user exists)"
>
> However if I change the order of 1 and 2 above by stopping snmpd first and
> then updating the createUser line, then I see the usmUser line is updated
> successfully.
> snmpwalk and sending traps is working fine.
> Not sure whether we need some sleep in between snmpd restart.
>
> What is the correct step to follow when creating a V3 user?
> Is there some delay need to be given between snmpd stop/start ?
>
> Thanks in advance,
> Salim Malik
> _______________________________________________
> 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
>
_______________________________________________
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