Direct logout, when mount of server shares failed

Sometimes mounting the server shares fails when logging in (missing
krb5-tickts). On devices with localhome, users can still log in. To
prevent this, users are immediately logged out if the server mounts are
missing.
This commit is contained in:
Raphael Dannecker 2025-02-27 18:34:44 +01:00
parent 677931a483
commit 5b4a287cca

View file

@ -33,6 +33,9 @@
dest: /etc/profile.d/lmn-logout.sh dest: /etc/profile.d/lmn-logout.sh
content: | content: |
[[ "${UID}" -gt 10000 ]] && ! findmnt "/lmn/media/${USER}/home" > /dev/null && exit 0 [[ "${UID}" -gt 10000 ]] && ! findmnt "/lmn/media/${USER}/home" > /dev/null && exit 0
{% if 'teacherlaptop' not in group_names %}
[[ "${UID}" -gt 10000 ]] && ! findmnt /srv/samba/schools/default-school > /dev/null && exit 0
{% endif %}
- name: Provide rmexam script - name: Provide rmexam script
ansible.builtin.copy: ansible.builtin.copy: