25 07 2013
Creating users with Puppet.
It’s fairly simple to add system users with puppet to servers, however I had to do a little bit of googling to find some working examples so I will put it here for future reference.
I have only used this on RHEL
To add a user you just need to do;
user { "craig": ensure => present, home => "/home/craig", managehome => true, groups => "wheel", password => '$1$Ou68nHrs$wVIySKVIkoMhJEzCAoqpd/', }
The password needs to be in md5 format, I used md5pass on my ubuntu desktop to generate the hashes, but you can use whichever method you prefer.
To add an authorized ssh key for a user, you just need to do the following;
The key looks like this;
ssh-rsa AAAAB3N............sdfESEaHARRr= craig@nerdier.co.uk
So the puppet format is;
ssh_authorized_key{ "craig@nerdier.co.uk": ensure => present, key => "AAAAB3N............sdfESEaHARRr=", type => ssh-rsa, user => craig, }
Install PostgreSQL 9.x on cPanel. Setting up a VDS using a stacklet image.