Switch from pam_mount to a multiuser cifs mount

This commit is contained in:
Gašper Fele-Žorž 2025-10-24 17:11:25 +02:00
parent 7cea32ecba
commit 8b96036196
4 changed files with 37 additions and 9 deletions

View file

@ -4,6 +4,7 @@
- realmd
- sssd
- libpam-mount
- kstart
- heimdal-clients
- name: Remove krb5-user
@ -46,19 +47,38 @@
owner: root
mode: 0600
- name: Configure libpam-mount
copy:
src: pam_mount.conf.xml
dest: /etc/security/pam_mount.conf.xml
#- name: Configure libpam-mount
# copy:
# src: pam_mount.conf.xml
# dest: /etc/security/pam_mount.conf.xml
- name: Enable libpam-mount
command: pam-auth-update --enable libpam-mount
become: true
#- name: Enable libpam-mount
# command: pam-auth-update --enable libpam-mount
# become: true
- name: Disable libpam-mkhomedir
command: pam-auth-update --disable mkhomedir
become: true
- name: Create kstart service
copy:
src: kstart.service
dest: /etc/systemd/system/kstart.service
- name: Start kstart service to enable cifs mount
copy:
src: kstart.service
dest: /etc/systemd/system/kstart.service
- name: Add mount - cifs_home
mount:
boot: true
fstype: cifs
src: "//ucilnicesmb.fri1.uni-lj.si/ucilnice_d"
path: /mnt/cifs_home
state: mounted
opts: "cruid=0,username={{ inventory_hostname }}-linux@FRI1.UNI-LJ.SI,sec=krb5i,nobrl,sfu,nostrictsync,cache=loose,mfsymlinks,dir_mode=0700,file_mode=0700,fsc,multiuser,x-systemd.requires=kstart.service"
- name: Restart sssd
service:
name: sssd