On Nov 27, 7:33 pm, RijilV <[EMAIL PROTECTED]> wrote:
> 2008/11/27 kevin <[EMAIL PROTECTED]>
>
>
>
> > I'd like to use puppet to create users.
>
> > Specifically, I'd like to create users, ensure the .ssh dirs are
> > there, add them to the adm group, that sort of thing.
> > I'm wondering how to do this, I've been looking through the docs but I
> > could use a bit of help... any pointers?
>
> This is not a complete example, you should probably wrap this as a define.
> I also recommend that if you're going to use puppet to create users you set
> their UID/GID manually.  Though I also recommend that you use something like
> LDAP for user mgmt rather than local auth.
>
> # First create the user, use the 'user' type.
> # Seehttp://reductivelabs.com/trac/puppet/wiki/TypeReference#id229
> user { "lazyweb":
>    groups => 'adm',
>    commend => 'This user was created by Puppet',
>    ensure => 'present',
>    managed_home => 'true',
>
> }
>
> # The managed_home above creates the home dir, but we also need
> # the .ssh dir, use the file type
> # seehttp://reductivelabs.com/trac/puppet/wiki/TypeReference#file
> file { "/home/lazyweb/.ssh":
>     ensure => 'directory',
>     require => User['lazyweb'],
>     owner => 'lazyweb',
>     mode => '700',
>
> }
>
> # now load up the key...
> # seehttp://reductivelabs.com/trac/puppet/wiki/TypeReference#ssh-authorize...
> ssh_authorized_key { "lazyweb-rsa-key":
>    ensure => 'present',
>    key => 'AAAA......',
>    type => 'rsa',
>    user => 'lazyweb',
>    require => File["/home/lazyweb/.ssh"],
>
> }
>
> .r'

Again, thanks very much.  I'm intrigued about your LDAP comment... can
you point me where to look into that?
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to