How to add user in centos 6.6 from puppetserver to puppetAgent

36 views
Skip to first unread message

Huynh Tran

unread,
Aug 6, 2015, 9:28:18 AM8/6/15
to Puppet Users
I want add user from PuppetMaster to PuppetAgent with authorities root or user use. I'll have to configure or code ,how?

Huynh Tran

unread,
Aug 7, 2015, 5:23:14 AM8/7/15
to Puppet Users
Please, Help me!............

Vào 20:28:18 UTC+7 Thứ Năm, ngày 06 tháng 8 năm 2015, Huynh Tran đã viết:

Christopher Wood

unread,
Aug 7, 2015, 7:03:16 AM8/7/15
to puppet...@googlegroups.com
This might help?

https://docs.puppetlabs.com/references/latest/type.html#user

I think some of these may be useful to you:

https://learn.puppetlabs.com/category/self-paced-training
> --
> 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 [1]puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/puppet-users/9ad01326-71ee-4ae4-91cb-c89cf3577193%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:puppet-users...@googlegroups.com
> 2. https://groups.google.com/d/msgid/puppet-users/9ad01326-71ee-4ae4-91cb-c89cf3577193%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout

Huynh Tran

unread,
Aug 12, 2015, 11:15:25 PM8/12/15
to Puppet Users
Thank you! I have the code in ../manifestss/site.pp: 
user {'testuser':
ensure => 'present',
comment => 'testuser',
# gid => '500',
# home => '/home/testuser',
managehome => true,
# password => '$6$L41Vuii1$MVPd0RAeVTopbm4sgFp1dwTvP3cyY//.8jQs3xvdUKtNbCthRcVCvxSHwhG0w.blW8V2KPaY7HhFkGApVcm1o0',
# password => '123456',
password_max_age => '99999',
password_min_age => '0',
# shell            => '/bin/bash',
# uid              => '500',
}
 exec {'changepass':
       command => 'echo -e \"12345\n12345\" | sudo passwd testuser',
       command => 'echo -e "testuser ALL NOPASSWD: ALL" >> etc/sudoers',
       refreshonly => true,
       path => '/sbin:/bin:/usr/sbin:/usr/bin',
}

I want it change password for new user, after insert 'echo -e "testuser ALL NOPASSWD: ALL"', in file "/etc/sudoers". but, it's non-active for new user.
Help me please! Thank you very much!...
Reply all
Reply to author
Forward
0 new messages