snmpd not working well with selinux?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I am trying to use SNMP on a CentOS 6.2 server, and am using the
'pass_persist' configuration command:

     pass_persist  .   /usr/local/sbin/snmp-iostat

I have set the file context of 'snmpd_exec_t' on the snmp-iostat

If I disable SELinux, then it all works fine (that is, I can then
snmpget/snmpwalk for OIDs in the configured pass_persist OID, and values
are returned). If I enable SELinux and start the snmpd daemon, as root,
from the command line, then again it all works fine. However, if I
enable SELinux, and startup the SNMP daemon using the 'service' command,
as occurs at system boot, then I get no values returned. I get, for

   snmpwalk -v 2c -c public localhost enterprises.
   SNMPv2-SMI::enterprises. = No Such Instance currently
   exists at this OID

(Yes I am using the enterprise number 141 which doesn't belong to us. I
have applied for a site enterprise number, but heard nothing yet.)

I really don't want to disable SELinux completely, but 'getsebool' shows
no variables relating to SNMP so I am a bit stuck as to how I can get
this to work. I also don't understand why it works with SELinux enabled
when started from the command line, but not when started by the
'service' command. That seems very odd.

Anyone any ideas about this?



John Horne                   Tel: +44 (0)1752 587287
Plymouth University, UK      Fax: +44 (0)1752 587001
CentOS mailing list

[CentOS]     [CentOS Announce]     [CentOS Docs]     [CentOS Virtualization]     [Linux Media]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Xfree86]     [Linux USB]     [Project Hail Cloud Computing]

Powered by Linux Add to Google