Introduction of a new device class (localhome).
- user-home is on local disk - additional entry in dolphin: home@server - display info about localhome on login-screen - provide unison-config for sync home with home@server - force user to be logged out immediately after first login, because home-dir must exists for bind-mounts on /lmn/media
This commit is contained in:
parent
4aeee9442c
commit
08f0f082fd
6 changed files with 111 additions and 3 deletions
35
roles/lmn_localhome/tasks/main.yml
Normal file
35
roles/lmn_localhome/tasks/main.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
- name: enable pam_mkhomedir.so
|
||||
lineinfile:
|
||||
dest: /etc/pam.d/common-session
|
||||
line: "session optional pam_mkhomedir.so umask=0077"
|
||||
insertbefore: "session optional pam_mount.so"
|
||||
|
||||
- name: Patch sddm login screen to inform about localhome
|
||||
blockinfile:
|
||||
path: /usr/share/sddm/themes/debian-breeze/Main.qml
|
||||
marker: // {mark} ANSIBLE MANAGED BLOCK localhome
|
||||
insertbefore: '\s+//Footer'
|
||||
block: |
|
||||
Text {
|
||||
id: localhome
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: 10
|
||||
anchors.leftMargin: 15
|
||||
color: "#ffffff"
|
||||
text: "Lokale Anmeldung!\nHome-Verzeichnis liegt nicht im Netz!"
|
||||
font.pointSize: config.fontSize
|
||||
}
|
||||
|
||||
- name: Copy unison-createconfig scripts
|
||||
ansible.builtin.copy:
|
||||
src: lmn-create-unisonconfig.sh
|
||||
dest: /usr/local/bin/
|
||||
mode: 0755
|
||||
|
||||
- name: Install auto-logout-script for first login in /etc/profile.d/
|
||||
copy:
|
||||
dest: /etc/profile.d/lmn-logout.sh
|
||||
content: |
|
||||
[[ "${UID}" -gt 10000 ]] && ! findmnt "/lmn/media/${USER}/home" > /dev/null && exit 0
|
Loading…
Add table
Add a link
Reference in a new issue