Thanks for the responds Russel,
responding to where the sudo class /module is from, I created it
any pointers???



On Saturday, March 28, 2015 at 10:40:20 AM UTC-4, Russell Anderson wrote:
>
> First, the visudo check didn't work otherwise it would have given actual 
> feedback, not usage info. 
>
> Second, where is this sudo class / module come from.  Nothing in the 
> command snippets creates it. 
>
> On Friday, March 27, 2015 at 3:24:58 PM UTC-4, manyi wrote:
>>
>> Help needed!!
>>
>> I am trying to add 2 users to /ect/sudoers john.smith and jane.may 
>> granting privileges to all servers
>>
>> *step 1. **modules/user/manifests/init.pp *
>>
>>
>> class user {
>>
>>  user { 'john.smith':
>>
>>  ensure => present,
>>
>>  comment => 'john.smith',
>>
>>  home => '/home/john.smith',
>>
>>  managehome => true 
>>
>>    } 
>>
>> } 
>>
>>
>> *Step 2  manifests/site.pp*
>>
>>  
>>
>> /etc/puppet/manifests/site.pp 
>>
>> node 'mydomain.local.org'
>>
>>  { include user } 
>>
>>
>> *step 3 :* sudo mkdir -p modules/sudoers/manifests
>>
>> *Step 4*   sudo mkdir -p modules/sudoers/files
>>
>> step 5  
>>
>> Create the file modules/sudoers/manifests/init.pp
>>
>> # Manage the sudoers file
>>
>>  class sudoers { 
>>
>> file { '/etc/sudoers':
>>
>>  source => 'puppet:///modules/sudoers/sudoers'
>>
>>  mode => '0440', 
>>
>> owner => 'root',
>>
>>  group => 'root', 
>>
>>    } 
>>
>> } 
>>
>>
>> *Step 6 *Check the syntax of the sudoers file
>>
>> visudo -c -f modules/sudoers/files/sudoers modules/sudoers/files/sudoers 
>>
>> *output*:
>>
>> usage: visudo [-chqsV] [-f sudoers]
>>
>> step 7:
>>
>> back in manifests/site.pp
>>
>> node 'mydomain.local.org' {
>>
>> include user
>>
>> include sudoers
>>
>> }
>>
>> step 8
>>
>> puppet$ sudo puppet agent --test
>>
>> does respond
>>
>>
>> I finally tried:
>>  
>> node 'mydomain.local.org' {
>>
>>   class { 'sudo': }
>>
>>   sudo::conf { 'john.smith':
>>
>>     priority => 10,
>>
>>     source   => 'puppet:///files/etc/sudoers.d/users/john.smith',
>>
>>    }
>>
>> }
>>
>>
>> still the agent doesn't respond
>>
>> can someone point me to the right direction please 
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/92c8d8ad-498f-4b69-bdfa-2e640a638dd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to