On Thu, 26 Mar 2009 09:34:11 +0000, Dave Shield <[email protected]> wrote :
> 2009/3/26 lanas <[email protected]>: > > Using net-snmp 5.4.1 and creating one V3 user, I noticed that the > > persistent snmpd.conf file is always growing at each shutdown and > > startup of the daemon. > > What is the difference between two successive copies of the file? http://pastebin.ca/1373031 This is the first file with only the createUser line. At that time snmpd (5.4.1) is stopped. After starting it, lines are added. Note that the createUser line is still there. http://pastebin.ca/1373037 A few seconds later (eg. no other operation was made) snmpd is stopped. Upon stopping it updates the persistent file by adding more lines. The .1 file was made by coying the persistent snmpd.conf above, and .2 was made by copying the persistent snmpd.conf after stopping snmpd. > I've just tried this with my installation (which also uses v5.4.1) > and there's nothing extra added to the persistent config file. > The length stays the same (although a couple of directives do > change value). Can you try with the following environment variables: SNMPCONFPATH=/etc/snmp:/etc/snmp/persistent SNMP_PERSISTENT_FILE=/etc/snmp/persistent/snmpd.conf > Sudden thought - do you happen to have a "createUser" line in > one of your *other* snmpd.conf files? That might well cause the > behaviour that you're seeing. The only one I can see by grepping /etc/snmpd/ is the one that lingers in the persistent file. Removing it could maybe solve the problem, but I somehow tested something like this w/o success (I'd have to confirm). The net effect of this problem on the user side is that the V3 user cannot be deleted. The growing file problem is also of good importance on devices with a small footprint. About deleting a V3 user 'programmatically', normally it'd consist of stopping snmpd, removing the usmUser line, and re-starting snmpd, isn't it ? 5.2.3 does not have this problem. I thought that comparing ../snmplib/read_config.c could give a hint, but there were substantial changes in there. Thanks for any help/suggestions/ideas. This is a real bugger, especially when discovered in a critical time nearing a product release ! ------------------------------------------------------------------------------ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
