Well I verified that putting the following line in /etc/sudoers works<div><br></div><div>zabbix ALL=NOPASSWD: /var/lib/zabbix/bin/start_puppet</div><div><br></div><div>However if I put it in /etc/sudoers.d/zabbix-puppet it does not.  Exact same spacing and everything.</div>
<div><br></div><div>The file was created with Puppet , and based on these errors I'm at a loss...</div><div><br></div><div>I check the syntax, it fails</div><div><br></div><div><div># visudo -c -f /etc/sudoers.d/zabbix-puppet </div>
<div>>>> /etc/sudoers.d/zabbix-puppet: syntax error near line 0 <<<</div><div>parse error in /etc/sudoers.d/zabbix-puppet near line 0</div><div><br></div><div>I then open the file with visudo, make absoltely no changes, just ":q" out, still get error.</div>
<div><br></div><div># visudo -f /etc/sudoers.d/zabbix-puppet </div><div>>>> /etc/sudoers.d/zabbix-puppet: syntax error near line 0 <<<</div><div><br></div><div>Then if I run the syntax check again it passes.  However I still can't run the command without password prompt.</div>
<div><br></div><div># visudo -c -f /etc/sudoers.d/zabbix-puppet </div><div>/etc/sudoers.d/zabbix-puppet: parsed OK</div></div><div><br></div><div>The files permissions are correct as specified by sudoers documentation on #includedir</div>
<div><br></div><div><div>-r--r-----   1 root root   56 Jul 26 15:55 zabbix-puppet</div></div><div><br></div><div><br></div><div>Does anyone else have the #includedir working in CentOS 5.6 or 6?</div><div><br></div><div>Thanks</div>
<div>- Trey</div><div><br><div><br><div class="gmail_quote">On Mon, Jul 25, 2011 at 7:12 PM, John R Pierce <span dir="ltr"><<a href="mailto:pierce@hogranch.com">pierce@hogranch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 07/25/11 4:41 PM, Trey Dockendorf wrote:<br>
> I am unable to get the #includedir function to work with sudo.  This<br>
> works just fine on all my CentOS 5.6 servers, but on 6 it is being<br>
> ignored.  I have this line in the file /etc/sudoers.d/zabbix-puppet<br>
><br>
> zabbix ALL=NOPASSWD: /var/lib/zabbix/bin/start_puppet<br>
><br>
> However sudo still requires a password.  If I put that same line into<br>
> /etc/sudoers file , there is no password prompt.  At the end of my<br>
> sudoers file I have this line<br>
><br>
> #includedir "/etc/sudoers.d"<br>
><br>
<br>
</div>did you edit these files with visudo -f /path/to/file ?   I'd try that.<br>
<font color="#888888"><br>
<br>
--<br>
john r pierce                            N 37, W 122<br>
santa cruz ca                         mid-left coast<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div><br></div></div>