Mount smb home next to local home directory.

This commit is contained in:
Andreas B. Mundt 2020-12-04 18:01:41 +01:00
parent 1c14ea3939
commit 8aec6687d7

View file

@ -3,6 +3,8 @@
apt: apt:
name: name:
- sssd-ldap - sssd-ldap
- libpam-mount
- cifs-utils
state: latest state: latest
- name: add URI to ldap.conf - name: add URI to ldap.conf
@ -38,9 +40,28 @@
line: "session optional pam_mkhomedir.so" line: "session optional pam_mkhomedir.so"
insertafter: "# end of pam-auth-update config" insertafter: "# end of pam-auth-update config"
# command: /usr/sbin/pam-auth-update --enable mkhomedir - name: configure pam_mount
blockinfile:
## oddjob-mkhomedir works only with sec=sys for the NFSv4 share dest: /etc/security/pam_mount.conf.xml
block: |
<volume
fstype="cifs"
server="smb.steinbeisschule-reutlingen.de"
path="DOCS/fvs/home/"
mountpoint="~/winhome"
/>
<!--volume
fstype="fuse"
path="sshfs#%(USER)@homes:"
mountpoint="/home/%(USER)"
options="StrictHostKeyChecking=no,allow_root"
/>
<volume
path="/home/%(USER)"
mountpoint="~"
options="bind"
/-->
insertafter: "<!-- Volume definitions -->"
- name: provide identities from directory - name: provide identities from directory
template: template: