usmStatsUnknownUserNames error with Blank ContextName

Arvind Uniyal <[email protected]> Thu, 25 May 2023 13:03:18 +0530
Newsgroups gmane.network.net-snmp.user
Message-ID <CACc8aYED1Vx3ehBDp8x1-=AxxVdfpnU+r-fAYM2Fkwf+Oz7amA@mail.gmail.com>
--===============2632957626212637537==
Content-Type: multipart/alternative; boundary="0000000000005947bb05fc7fa42d"

--0000000000005947bb05fc7fa42d
Content-Type: text/plain; charset="UTF-8"

Hi,

Objective: Create a snmpv3 user with blank contextName.

I have netsnmp library code and I create a snmpv3 user with below lines in
snmpd.conf file

group grpSample usm User123

view snmp_view included .1

access grpSample "" any priv exact snmp_view snmp_view none

engineIDType 3

createUser User123 MD5 "Auth_pass" DES "PrivPass"

Now when I contact the printer I get and error saying
Excerpt of response on Mib Browser
Security model: USM
1: usmStatsUnknownUserNames.0 (Counter32) 5

and from command prompt
>snmpget -v3 -l authPriv -u User123 -a MD5 -A "Auth_pass" -x DES -X
"PrivPass" -n "" <Ip> <OID>
snmpget: Unknown user name


I added some logs and can see that the function usm_get_user_from_list()
returns NULL.

In the function usm_get_user_from_list, the control never enters the for
loop. So, I guess the usm Userlist is NULL.

Any input would be appreciated.

--0000000000005947bb05fc7fa42d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>Objective: Create a snmpv3 user wit=
h blank contextName.<br><br>I have netsnmp library code and I create a snmp=
v3 user with below lines in snmpd.conf file<br><br>group grpSample usm User=
123<br><br>view snmp_view included .1<br><br>access grpSample &quot;&quot; =
any priv exact snmp_view snmp_view none<br><br>engineIDType 3<br><br>create=
User User123 MD5 &quot;Auth_pass&quot; DES &quot;PrivPass&quot;<br><br>Now =
when I contact the printer I get and error saying<br>Excerpt of response on=
 Mib Browser<br>Security model: USM<br>1: usmStatsUnknownUserNames.0 (Count=
er32) 5<br><br>and from command prompt<br>&gt;snmpget -v3 -l authPriv -u Us=
er123 -a MD5 -A &quot;Auth_pass&quot; -x DES -X &quot;PrivPass&quot; -n &qu=
ot;&quot; &lt;Ip&gt; &lt;OID&gt;<br>snmpget: Unknown user name<br>=C2=A0<br=
>=C2=A0<br>I added some logs and can see that the function usm_get_user_fro=
m_list() returns NULL.<br><br>In the function usm_get_user_from_list, the c=
ontrol never enters the for loop. So, I guess the usm Userlist is NULL.<br>=
<br>Any input would be appreciated.<br></div></div>

--0000000000005947bb05fc7fa42d--


--===============2632957626212637537==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============2632957626212637537==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============2632957626212637537==--