OK, so I found that my snmp commands actually did not find the MIBs, or more precisely did not read /etc/snmp/snmp.conf, as I get the following whatever I put in the said file:
if I put mibs +TCS-MIB % snmpwalk -v3 -u test1 -l authPriv -a MD5 -A test1tcs -x DES -X test1tcs localhost:port tcs trace: read_config(): read_config.c, 796: read_config: /etc/snmp/snmp.conf:15 examining: debugTokens agent/handler/snmpd trace: run_config_handler(): read_config.c, 499: read_config: Found a parser. Calling it: debugTokens / agent/handler/snmpd registered debug token agent/handler/snmpd, 1 tcs: Unknown Object Identifier (Sub-id not found: (top) -> tcs) % snmpwalk -m ~/.snmp/mibs/TCS-MIB -v3 -u test1 -l authPriv -a MD5 -A test1tcs -x DES -X test1tcs localhost:port tcs trace: read_config(): read_config.c, 796: read_config: /etc/snmp/snmp.conf:15 examining: debugTokens agent/handler/snmpd trace: run_config_handler(): read_config.c, 499: read_config: Found a parser. Calling it: debugTokens / agent/handler/snmpd registered debug token agent/handler/snmpd, 1 /home/daniel/.snmp/mibs/TCS-MIB: No such file or directory tcs: Unknown Object Identifier (Sub-id not found: (top) -> tcs) % snmpwalk -m ~/.snmp/mibs/TCS-MIB.mib -v3 -u test1 -l authPriv -a MD5 -A test1tcs -x DES -X test1tcs localhost:port tcs trace: read_config(): read_config.c, 796: read_config: /etc/snmp/snmp.conf:15 examining: debugTokens agent/handler/snmpd trace: run_config_handler(): read_config.c, 499: read_config: Found a parser. Calling it: debugTokens / agent/handler/snmpd registered debug token agent/handler/snmpd, 1 TCS-MIB::tcs = No Such Object available on this agent at this OID if I put mibs +TCS-MIB.mib % snmpwalk -m ~/.snmp/mibs/TCS-MIB.mib -v3 -u test1 -l authPriv -a MD5 -A test1tcs -x DES -X test1tcs localhost:port tcs trace: read_config(): read_config.c, 796: read_config: /etc/snmp/snmp.conf:16 examining: debugTokens agent/handler/snmpd trace: run_config_handler(): read_config.c, 499: read_config: Found a parser. Calling it: debugTokens / agent/handler/snmpd registered debug token agent/handler/snmpd, 1 TCS-MIB::tcs = No Such Object available on this agent at this OID % snmpwalk -v3 -u test1 -l authPriv -a MD5 -A test1tcs -x DES -X test1tcs localhost:port tcs trace: read_config(): read_config.c, 796: read_config: /etc/snmp/snmp.conf:16 examining: debugTokens agent/handler/snmpd trace: run_config_handler(): read_config.c, 499: read_config: Found a parser. Calling it: debugTokens / agent/handler/snmpd registered debug token agent/handler/snmpd, 1 MIB search path: /home/daniel/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp:/home/daniel/.snmp/mibs Cannot find module (TCS-MIB.mib): At line 0 in (none) tcs: Unknown Object Identifier (Sub-id not found: (top) -> tcs) even though I have % ls -l /home/daniel/.snmp/mibs/TCS-MIB.mib ~ -rwxrwxr-x 1 daniel daniel 4548 20 juin 11:38 /home/daniel/.snmp/mibs/TCS-MIB.mib* So I changed for a pass extension on which I a currently working. A basic example that does not take my private mib structure into account works ONLY IF I replace at the end of the module identity ::= { enterprises 16304 3665 } which is the kind of thing I must have, with ::= { enterprises 16304 } which is simpler but works even though it is not the expected structure Thanks for any help, Daniel Chayvialle -----Message d'origine----- De : Chayvialle, Daniel (External) Envoyé : mardi 19 juin 2012 17:51 À : 'net-snmp-users@lists.sourceforge.net' Cc : 'Dave Shield' Objet : RE: Stuck in the way of quering a private MIB (extension using perl) So, nobody? Just in case this was not clear previously, the Net-SNMP that comes with debian is v5.4.3, Synaptic says Daniel -----Message d'origine----- De : Chayvialle, Daniel (External) Envoyé : mardi 12 juin 2012 09:55 À : Chayvialle, Daniel (External); 'Dave Shield' Cc : 'net-snmp-users@lists.sourceforge.net' Objet : RE: Stuck in the way of quering a private MIB (extension using perl) Any idea why I cannot extend the agent using perl and why I cannot use the access control0 stored in config file? Daniel. -----Message d'origine----- De : Chayvialle, Daniel (External) Envoyé : vendredi 8 juin 2012 12:43 À : 'Dave Shield' Cc : net-snmp-users@lists.sourceforge.net Objet : RE: Stuck in the way of quering a private MIB (extension using perl) The way I created the new user (test1) is % sudo net-snmp-config --create-snmpv3-user then answering the questions. As I reinstalled (using synaptics) all snmp-related packages after trying to compile the latest sources, this should be the vendor-provided version. The said line (createUser...) did not disappear from the file in /var neither. But trying again with /usr/bin/net-snmp-config (dated 20120105) and another user (test2) did not reproduce the problem (but the line for test1 is still there). The recommended usage for password is, from what I read, to put it in the ~/snmp.conf file (using a defAuthPassphrase, together with the adequate defSecurityLevel, defAuthType and defPrivType) so that it does not appear in a command's argument, which is safer. Daniel -----Message d'origine----- De : dave.shi...@gmail.com [mailto:dave.shi...@gmail.com] De la part de Dave Shield Envoyé : jeudi 7 juin 2012 21:31 À : Chayvialle, Daniel (External) Cc : net-snmp-users@lists.sourceforge.net Objet : Re: Stuck in the way of quering a private MIB (extension using perl) On 7 June 2012 17:59, Chayvialle, Daniel (External) <daniel.chayvialle.exter...@cassidian.com> wrote: > OK, so now I'm getting a bit confused regarding configuration file locations. > > I added a new user using the command line. It added lines in > /var/net-snmp/snmpd.conf and /usr/local/share/snmp/snmpd.conf (whiwh is what > the command snmpd -Dread_config -H 2>&1 | grep "Reading" | sort -u gives me, > to my stupefaction) Which snmpd binary are you running here? The vendor-supplied one, or one that you've compiled yourself? Try giving the full path to the binary, just to make sure. > but after restarting the agent the user was unknown, so I placed those lines > in /etc/snmp/snmpd.conf. > The user was then recognised but the lines did not > disappear from any of those files. It won't disappear from the /etc/snmp file, no. The *only* config file that the agent re-writes is the one under /var. > On top of this, I'm trying to follow the advice given to place the password > not on the CLI but in ~/snmp.conf but to no avail as it seems. Sorry - that's too vague to be clear as to what you're trying to do. Dave ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ 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