You will need to create the SNMP V3 user.

See:
https://net-snmp.sourceforge.io/wiki/index.php/TUT:SNMPv3_Options for a
tutoria on configuration setup.

You might also want to check your access control:
https://net-snmp.sourceforge.io/wiki/index.php/Vacm


On Tue, Aug 9, 2022 at 3:48 AM 김동휘 <andyki...@rocketibt.co.kr> wrote:

> I am now implement a snmp agent based on the unbuntu/net-snmp[ver
> 5.0.11.2].
>
>
>
> -        SNMP v3
>
> -        SNMP Manager IP : 192.168.10.171[for agent test], SNMP Agent IP
> : 192.168.10.180
>
>
>
> My snmpd.conf file is like the following
>
> =================================================================
>
> com2sec           andytest          localhost                   public
>
> com2sec           mynetwork        192.168.10.0/24           enseirb
>
>
>
> group MyRWGroup         v1         andytest
>
> group MyRWGroup         v2c        andytest
>
> group MyRWGroup         usm        andytest
>
> group MyROGroup         v1         mynetwork
>
> group MyROGroup         v2c        mynetwork
>
> group MyROGroup         usm        mynetwork
>
>
>
> #view systemview           included .1.3.6.1.2.1.1
>
> #view systemview           included .1.3.6.1.2.1.25.1.1
>
> view all                        included .1
> 80
>
>
>
> access MyROGroup ""      any       noauth    exact  systemview    none
> none
>
> access MyRWGroup ""      any       noauth    exact  all    all    none
>
> =================================================================
>
>
>
> The MIB file is simple for testing.
>
> =================================================================
>
> ENSEIRB-MIB DEFINITIONS ::= BEGIN
>
>
>
> IMPORTS
>
>            enterprises
>
>                       FROM SNMPv2-SMI,
>
>            MODULE-IDENTITY
>
>                       FROM SNMPv2-SMI
>
>            MODULE-COMPLIANCE,
>
>            OBJECT-GROUP
>
>                       FROM SNMPv2-CONF;
>
>
>
> --
>
> -- A brief description and update information about this mib.
>
> --
>
> enseirb MODULE-IDENTITY
>
>                       LAST-UPDATED "0104010000Z" -- 01 Apr 2001, midnight
>
>                       ORGANIZATION "ENSEIRB"
>
>                       CONTACT-INFO "
>
>                                  Author: Patrice Kadionik
>
>                                  phone: +33-5-56-84-65-00
>
>                       "
>
>                       DESCRIPTION "MIB for remote control by SNMP"
>
>            ::= { enterprises 9362 }
>
>
>
> leds OBJECT IDENTIFIER::= { enseirb 1 }
>
>
>
>
>
> --
>
> -- LED 0 connected to the PC parallel port
>
> --
>
> led0 OBJECT-TYPE
>
>                       SYNTAX Integer32 (0..1)
>
>                       MAX-ACCESS read-write
>
>                       STATUS current
>
>                       DESCRIPTION
>
>                       "Led 0 connected to bit 0 of the PC parallel port."
>
>                       DEFVAL { 0 }
>
>            ::= { leds 1 }
>
>
>
>
>
> END
>
> =================================================================
>
>
>
> When I try to access the agent[192.168.10.180] using snmpwalk(snmpwalk -v
> 3 -u andytest  192.168.10.180 system),
>
> “snmpwalk: Unknown user name” message is displayed.
>
>
>
>
>
> The agent log file is like the following
>
> =================================================================
>
> **************************** Recv Part ****************************
>
> trace: snmp_parse_var_op(): snmp.c, 151
>
> dumph_recv:             Name
>
> dumpx_recv:              06 06 2B 06 01 02 01 01
>
> dumpv_recv:                ObjID: SNMPv2-MIB::system
>
> trace: snmp_pdu_parse(): snmp_api.c, 4241
>
> dumph_recv:             Value
>
> trace: _snmp_parse(): snmp_api.c, 3967
>
> snmp_parse: Parsed SNMPv3 message (secName:andytest,
> secLevel:noAuthNoPriv): USM unknown security name (no such user exists)
>
>
>
> **************************** Send Part ****************************
>
> trace: snmp_realloc_rbuild_var_op(): snmp.c, 427
>
> dumph_send:         Name
>
> dumpx_send:          06 0A 2B 06 01 06 03 0F 01 01 03 00
>
> dumpv_send:            ObjID:
> SNMP-USER-BASED-SM-MIB::usmStatsUnknownUserNames.0
>
> =================================================================
>
>
>
> I have looked into the source code of the parsing the manager data.
>
> The usm_get_user_from_list() is called, but any valid data is not returned
> because there is not a user information in the userList.
>
>
>
> Why there isn’t a valid data in the userList?
>
> I think that the usm_add_user() and usm_save_users() functions save the
> information of user into the userList.
>
> But two function are never called when the snmpd(agent) is initialized.
>
>
>
> What could I clear this problem?
>
>
>
>
> _______________________________________________
> 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