Sudo and user modules

22 views
Skip to first unread message

Fran Rodríguez

unread,
Sep 24, 2013, 3:58:47 PM9/24/13
to example42-pu...@googlegroups.com
Hi there, 

I got a question about this modules, im trying to add a user to a sudo group, but im not sure how i can do. Im not sure if i can manage groups with user group, it seems that i can only create a normal group for a specific user, well that is what module does with $manage_group. I have seen that the sudo module can insert a directive on sudoers file with sudo::directive function. Which is the appropiate way or better?¿

Thanks

Alessandro Franceschi

unread,
Sep 25, 2013, 4:07:51 AM9/25/13
to example42-pu...@googlegroups.com
Well, the user module is quite primitive, the most interesting thing it has is the user::managed define, which adds some sugar to a user management.
The manage_group param (default true) creates a the primary group with the same name of the user you create.
To manage users and groups you can use also the Puppet user and group (http://docs.puppetlabs.com/references/latest/type.html#group)  native types .

So use them to create custom groups with various users.

Once you have the groups you need with the users you want, you can use the sudo module to manage them as you prefer.
For single sudo entries of config snippets, it's ok to use https://github.com/example42/puppet-sudo/blob/master/manifests/directive.pp
Reply all
Reply to author
Forward
0 new messages