Skip to content

Commit

Permalink
Added ccreds and mkhomedir.
Browse files Browse the repository at this point in the history
  • Loading branch information
fintanmm committed Oct 5, 2015
1 parent f93d23d commit dd377ae
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pam/ccreds.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% from "pam/map.jinja" import pam with context %}
ccreds:
pkg.installed:
- name: {{ pam.ccreds_pkg }}
6 changes: 6 additions & 0 deletions pam/files/mkhomedir
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Name: activate mkhomedir
Default: yes
Priority: 900
Session-Type: Additional
Session:
required pam_mkhomedir.so umask=0022 skel=/etc/skel
8 changes: 7 additions & 1 deletion pam/map.jinja
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
{% set pam = salt['grains.filter_by']({
'Ubuntu': {
'ldap_pkg': 'ldap-auth-client',
'ldap_pkg': 'libpam-ldapd',
'nsd': 'nscd',
'ldap_config': '/etc/ldap.conf',
'mkhomedir_pkg': 'libpam-mkhomedir',
'mkhomedir_config': '/usr/share/pam-configs/mkhomedir',
'ccreds_pkg': 'libpam-ccreds',
},
'Debian': {
'ldap_pkg': 'libpam-ldapd',
'ldap_config': '/etc/ldap.conf',
'mkhomedir_pkg': 'libpam-ccreds',
'mkhomedir_config': '/usr/share/pam-configs/mkhomedir',
'ccreds_pkg': 'libpam-ccreds',
},
}, merge=salt['pillar.get']('pam:lookup')) %}
11 changes: 11 additions & 0 deletions pam/mkhomedir.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% from "pam/map.jinja" import pam with context %}
{{ pam.mkhomedir_config }}:
file.managed:
- source: salt://pam/files/my_mkhomedir
- user: root
- group: root
pam-auth-update:
cmd.run:
- name: pam-auth-update

0 comments on commit dd377ae

Please sign in to comment.