FAQ
I am trying to update /etc/sudoers file using puppet. Here is the init.pp
function doing:

define sudoers() {
         file { "/etc/sudoers":
         owner => root,
         group => root,
         mode => 440,
         source => $operatingsystem ? {
                 "CentOS" => filelookup("users/sudoers-centos"),
                 default => filelookup("users/sudoers"),
             },
       }

While running puppet I am getting the error:

err:
/Stage[main]//Node[tcp-handler-base]/Users::Sudoers[sudoers-file]/File[/etc/sudoers]/content:
change from {md5}0897462d4d48fb9dedaafbaf91a9ceae to
{md5}3298e302080d0e63a5697dd39556ca66 failed: Could not rename temporary
file /etc/sudoers.puppettmp_8514 to /etc/sudoers: Operation not permitted -
/etc/sudoers.puppettmp_8514 or /etc/sudoers at
/etc/puppet/modules/users/manifests/init.pp:60

The persmission of /etc/sudoers file is 0440.

Can someone help in solving this.


--
Pradeep Chhetri

In the world of Linux, who needs Windows and Gates...

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Jakov Sosic at Jul 1, 2013 at 7:15 pm

    On 01/23/2013 01:34 PM, Pradeep Chhetri wrote:

    err:
    /Stage[main]//Node[tcp-handler-base]/Users::Sudoers[sudoers-file]/File[/etc/sudoers]/content:
    change from {md5}0897462d4d48fb9dedaafbaf91a9ceae to
    {md5}3298e302080d0e63a5697dd39556ca66 failed: Could not rename temporary
    file /etc/sudoers.puppettmp_8514 to /etc/sudoers: Operation not
    permitted - /etc/sudoers.puppettmp_8514 or /etc/sudoers at
    /etc/puppet/modules/users/manifests/init.pp:60

    The persmission of /etc/sudoers file is 0440.

    Can someone help in solving this.

    Are you running puppet as 'root' user? Also are you using SELinux?

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 23, '13 at 12:34p
activeJul 1, '13 at 7:15p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Pradeep Chhetri: 1 post Jakov Sosic: 1 post

People

Translate

site design / logo © 2022 Grokbase