On Mon, Oct 19, 2015 at 11:29 AM, Leandro <ingrogger@xxxxxxxxx> wrote: > Hello guys , I was trying to get a command output from my Centos 6 server > using the snmpd "exec" section. > > The line added to snmpd.conf id: > > exec get_whitelist /bin/cat /home/snmp_user/whitelist.txt > > Afer trying to get the resut performing the snmpwalk client form another > server I always got "permission denied" > After reading some forums I founded that disabling selinux It works. > My question is .. What is the proper way to achieve snmpd executing some > commands ? > In my case it is working now but ... Im not sure if disabling selinux is > the best way. > Disabling SELinux is not ideal. Might try sifting through some of this info: [0] http://serverfault.com/questions/517893/configure-selinux-to-allow-snmpd-to-read-to-a-custom-location [1] https://lists.centos.org/pipermail/centos/2012-May/126415.html [2] https://lists.centos.org/pipermail/centos/2012-May/126455.html [3] https://lists.centos.org/pipermail/centos/2012-May/126463.html [4] https://bugzilla.redhat.com/show_bug.cgi?id=822480 Though that bug was fixed in 6.2 according to the info at URL [4]. You're using C6.7 and not 6.6 or earlier, right? -- ---~~.~~--- Mike // SilverTip257 // _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx https://lists.centos.org/mailman/listinfo/centos