Benutzer anlegen
Simpel
www-data:
user.present:
- fullname: Webserver
- shell: /usr/sbin/nologin
- home: /var/www
- createhome: true
- system: true
- groups:
- www-data
Vollständig
thorsten-group:
group.present:
- name: thorsten
thorsten:
user.present:
- fullname: Thorsten Kramm
- shell: /bin/bash
- home: /home/thorsten
- createhome: true
- system: false
- groups:
- thorsten
- require:
- group: thorsten-group
thorstens-key:
ssh_auth.present:
- user: thorsten
- source: salt://linux/generic/ssh-keys/thorsten.kramm.id_rsa.pub
- require:
- user: thorsten
sudo:
pkg.installed: []
/etc/sudoers.d/thorsten:
file.managed:
- contents: thorsten ALL=(ALL) NOPASSWD:ALL
- require:
- pkg: sudo
- user: thorsten