Re: [Puppet Users] temporarily editing sudoers

2010-06-01 Thread James Cammarata
> On Jun 1, 2010, at 11:47 AM, Rob McBroom wrote: > >> I use Augeas for `sudoers`. This allows you to manage individual entries, >> instead of replacing the entire file. For instance, this will add an >> entry for a user named “joe” unless that entry already exists. >> >>augeas { "sudojoe":

Re: [Puppet Users] temporarily editing sudoers

2010-06-01 Thread Rob McBroom
On Jun 1, 2010, at 11:47 AM, Rob McBroom wrote: > I use Augeas for `sudoers`. This allows you to manage individual entries, > instead of replacing the entire file. For instance, this will add an entry > for a user named “joe” unless that entry already exists. > >augeas { "sudojoe": > c

Re: [Puppet Users] temporarily editing sudoers

2010-06-01 Thread Rob McBroom
On May 7, 2010, at 9:45 AM, Pieter Baele wrote: > We use a script to edit /etc/sudoers temporarily to provide sudo access to > clients for a limited time. > A cron job checks for a var and after a defined time the line is deleted. > > But this way, /etc/sudoers can't be managed by Puppet, becaus

Re: [Puppet Users] temporarily editing sudoers

2010-05-09 Thread Nigel Kersten
On Fri, May 7, 2010 at 6:45 AM, Pieter Baele wrote: > We use a script to edit /etc/sudoers temporarily to provide sudo access to > clients for a limited time. > A cron job checks for a var and after a defined time the line is deleted. > > But this way, /etc/sudoers can't be managed by Puppet, bec

Re: [Puppet Users] temporarily editing sudoers

2010-05-09 Thread Marc Fournier
On Fri, 7 May 2010 10:10:16 -0700 (PDT) John Philips wrote: > > But this way, /etc/sudoers can't be managed by Puppet, because It > will be overwritten by puppet. You could have your script set the > immutable attribute on the sudoers file.  Then puppet won't be able > to change it. > > chattr

Re: [Puppet Users] temporarily editing sudoers

2010-05-08 Thread Pieter Baele
On Fri, May 7, 2010 at 19:10, John Philips wrote: > > But this way, /etc/sudoers can't be managed by Puppet, because It will be > overwritten by puppet. > > You could have your script set the immutable attribute on the sudoers > file. Then puppet won't be able to change it. > > chattr +i /etc/su

Re: [Puppet Users] temporarily editing sudoers

2010-05-08 Thread Pieter Baele
On Fri, May 7, 2010 at 19:51, Adam Crews wrote: > On Fri, May 7, 2010 at 6:45 AM, Pieter Baele > wrote: > > We use a script to edit /etc/sudoers temporarily to provide sudo access > to > > clients for a limited time. > > A cron job checks for a var and after a defined time the line is deleted.

Re: [Puppet Users] temporarily editing sudoers

2010-05-07 Thread Adam Crews
On Fri, May 7, 2010 at 6:45 AM, Pieter Baele wrote: > We use a script to edit /etc/sudoers temporarily to provide sudo access to > clients for a limited time. > A cron job checks for a var and after a defined time the line is deleted. > > But this way, /etc/sudoers can't be managed by Puppet, beca

Re: [Puppet Users] temporarily editing sudoers

2010-05-07 Thread John Philips
But this way, /etc/sudoers can't be managed by Puppet, because It will be overwritten by puppet. You could have your script set the immutable attribute on the sudoers file.  Then puppet won't be able to change it. chattr +i /etc/sudoers When you want puppet to start managing the file again, re

[Puppet Users] temporarily editing sudoers

2010-05-07 Thread Pieter Baele
We use a script to edit /etc/sudoers temporarily to provide sudo access to clients for a limited time. A cron job checks for a var and after a defined time the line is deleted. But this way, /etc/sudoers can't be managed by Puppet, because It will be overwritten by puppet. What should I use as a