From 68239b56cb0638c66ca9af6304ffb5f38edf8383 Mon Sep 17 00:00:00 2001 From: Raphael Dannecker Date: Mon, 14 Aug 2023 08:26:06 +0200 Subject: [PATCH] Mount default-school by pam_mount and create symlinks to home and share --- roles/lmn_mount/files/lmn-linkhome.sh | 4 ++++ roles/lmn_mount/tasks/main.yml | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 roles/lmn_mount/files/lmn-linkhome.sh diff --git a/roles/lmn_mount/files/lmn-linkhome.sh b/roles/lmn_mount/files/lmn-linkhome.sh new file mode 100644 index 0000000..cae89fc --- /dev/null +++ b/roles/lmn_mount/files/lmn-linkhome.sh @@ -0,0 +1,4 @@ +if [[ "${UID}" -gt 60000 ]]; then + [[ -L "/media/${USER}/share" ]] || ln -s .default-school/share "/media/${USER}/share" + [[ -L "/media/${USER}/home" ]] || ln -s ".default-school/${HOME##/srv/samba/schools/default-school/}" "/media/${USER}/home" +fi diff --git a/roles/lmn_mount/tasks/main.yml b/roles/lmn_mount/tasks/main.yml index 8d60597..c4a85ca 100644 --- a/roles/lmn_mount/tasks/main.yml +++ b/roles/lmn_mount/tasks/main.yml @@ -22,6 +22,14 @@ options="sec=krb5i,cruid=%(USERUID),user=%(USER),file_mode=0700,dir_mode=0700,mfsymlinks,nobrl" >rootansibleDebian-gdmsddmvirti + rootansibleDebian-gdmsddmvirti +