<br><br><div class="gmail_quote">On Wed, Jul 27, 2011 at 7:39 AM, Craig White <span dir="ltr"><<a href="mailto:craigwhite@azapple.com">craigwhite@azapple.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 Tue, 2011-07-26 at 15:59 -0500, Trey Dockendorf wrote:<br>
> Well I verified that putting the following line in /etc/sudoers works<br>
><br>
><br>
> zabbix ALL=NOPASSWD: /var/lib/zabbix/bin/start_puppet<br>
><br>
><br>
> However if I put it in /etc/sudoers.d/zabbix-puppet it does not.<br>
>  Exact same spacing and everything.<br>
><br>
><br>
> The file was created with Puppet , and based on these errors I'm at a<br>
> loss...<br>
><br>
><br>
> I check the syntax, it fails<br>
><br>
><br>
> # visudo -c -f /etc/sudoers.d/zabbix-puppet<br>
> >>> /etc/sudoers.d/zabbix-puppet: syntax error near line 0 <<<<br>
> parse error in /etc/sudoers.d/zabbix-puppet near line 0<br>
><br>
><br>
> I then open the file with visudo, make absoltely no changes, just ":q"<br>
> out, still get error.<br>
><br>
><br>
> # visudo -f /etc/sudoers.d/zabbix-puppet<br>
> >>> /etc/sudoers.d/zabbix-puppet: syntax error near line 0 <<<<br>
><br>
><br>
> Then if I run the syntax check again it passes.  However I still can't<br>
> run the command without password prompt.<br>
><br>
><br>
> # visudo -c -f /etc/sudoers.d/zabbix-puppet<br>
> /etc/sudoers.d/zabbix-puppet: parsed OK<br>
><br>
><br>
> The files permissions are correct as specified by sudoers<br>
> documentation on #includedir<br>
</div>----<br>
probably should ask on the puppet list since using an includedir<br>
function would be far more likely with puppet where most people would<br>
just tack on their edits to /etc/sudoers directly.<br>
<br>
I am sort of interested in your solution by the way (I am on the puppet<br>
list too) because I use puppet but so far, only on Ubuntu and it appears<br>
that our CentOS systems will eventually be phased out.<br>
<br>
by the way, I have seen the same sort of spookiness about syntax errors<br>
created by visudo on Ubuntu 10.04 on perfectly valid edits. Had me<br>
scratching my head too. I used to always just use emacs to edit the file<br>
but at work, I try to play by the conventions.<br>
<br>
Craig<br>
<font color="#888888"><br>
<br>
--<br>
This message has been scanned for viruses and<br>
dangerous content by MailScanner, and is<br>
believed to be clean.<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><br></div><div>Craig,</div><div><br></div><div>I got things working...I posted my module on github if your interested , <a href="https://github.com/treydock/puppet-sudo">https://github.com/treydock/puppet-sudo</a> .  Was two problems.  First was can't have quotations around the #includedir path, second was that puppet wasn't puppeting a new line character in the file when using the "content" approach (see modules note).</div>
<div><br></div><div>- Trey</div>