Greetings,

I'm using a pre-packaged net-snmp 5.2.3 (debian's) and need to tell snmpd to 
look for and save configuration and persistent data only to /etc/.

I have tried setting:

   export SNMPCONFPATH=/etc/snmp:/etc/snmp/persistent
   export SNMP_PERSISTENT_FILE=/etc/snmp/persistent/snmpd.conf

which seems to half work in the most annoying ways:

1. If I start snmpd with no persistent data, it generates a file:



# wc /etc/snmp/persistent/snmpd.conf
  48 121 866 /etc/snmp/persistent/snmpd.conf
-------------------------------------------
setserialno 1598857342
ifXTable .1 18:0x 14:0 $
ifXTable .2 18:0x 14:0 $
ifXTable .3 18:0x 14:0 $
ifXTable .4 18:0x 14:0 $
ifXTable .5 18:0x 14:0 $
ifXTable .6 18:0x 14:0 $
ifXTable .8 18:0x 14:0 $
engineBoots 1
oldEngineID 0x80001f8880a8b75f627cc9ed45
------------------------------------------

2. When I stop the daemon, it appends the same data to the file:

# wc /etc/snmp/persistent/snmpd.conf
   96  242 1732 /etc/snmp/persistent/snmpd.conf

3. When I append a createUser directive to the file, eg.

     createUser userv3 MD5 "AuthPassphrase" DES PrivPassphrase

and run snmpd, I see the daemon at least reading the line:

read_config: /etc/snmp/persistent/snmpd.conf:49 examining: createUser userv3 
MD5 "AuthPassphrase" DES PrivPassphrase

*and* regenerating the persistent data file, adding the line

usmUser 1 3 0x80001f88805a5d091f34cbed45 0x75736572763300 0x75736572763300 
NULL .1.3.6.1.6.3.10.1.1.2 0x19d348eaf08410f1f7a277c4294e06cd 
.1.3.6.1.6.3.10.1.2.2 0x6c307e335f8d8f5c57d94bb86d050e33 ""

Unfortunately, it again adds it all to the previous contents, including the 
createUser line.

4. Stopping the daemon *again* appends the same data to the persistent conf 
file, including the usmUser line...


If I use the default paths - especially leaving persistent data in 
/var/lib/snmp/, I do not see this behaviour.

Does anyone have an idea what might be going amiss here?


Thanks in advance,

Michael Leslie,
Ruggedcom Inc.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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