Compare commits

..

36 commits

Author SHA1 Message Date
Andreas B. Mundt
f4893537d8 Fix conditionals for ansible version in trixie 2026-01-13 17:05:53 +01:00
Raphael Dannecker
cdfc7c2d9c Set the environment variable for the path to KiCad's 3D models (NFS) 2025-12-17 19:43:54 +01:00
Raphael Dannecker
04a5e8b455 Enable ARP support in nftable for outbound restriction in exam_mode 2025-12-17 19:43:33 +01:00
Raphael Dannecker
1f45184d0c Apply outbound restriction in exam_mode on macvtap interfaces too 2025-12-17 13:24:24 +01:00
Raphael Dannecker
a986254abc Apply libvirt firewall policy only on devices with vm_support 2025-12-17 13:19:43 +01:00
Raphael Dannecker
928b62ac3b Specify teacherpc IP addresses for some classrooms (for the firewall in exam mode) 2025-12-15 08:21:08 +01:00
Raphael Dannecker
4687ac4888 Make IP addresses of teacherpc configurable (for the firewall in exam mode) 2025-12-15 08:17:39 +01:00
Raphael Dannecker
21f4cbcbc3 Correct the determination of the teacher's PC's IP address (a75934c) 2025-12-11 17:27:50 +01:00
Raphael Dannecker
a3035463bb Add package php-sqlite3 (required for teaching purposes) 2025-12-11 14:36:16 +01:00
Raphael Dannecker
6f0f611bd5 Fix graphic issues in Chromium for specific video cards 2025-12-10 15:47:21 +01:00
Raphael Dannecker
a4b94799f6 Enable outbound restriction for some PC rooms 2025-12-10 15:43:12 +01:00
Raphael Dannecker
a75934ca0b Restrict outbound traffic in exam-mode 2025-12-10 15:40:21 +01:00
Raphael Dannecker
806220fca1 Fix NETHOME detection issue for examusers, staff and parents 2025-12-10 14:34:01 +01:00
Raphael Dannecker
b9985102a8 Add hosts to inventory 2025-12-04 08:13:29 +01:00
Raphael Dannecker
110ff5efda Provide a skript to delete VM disks in /lmn/vm 2025-11-27 17:02:12 +01:00
Raphael Dannecker
ae04c0f8f4 Due to new media tables, change the default audio output for some PCs 2025-11-27 15:51:32 +01:00
Raphael Dannecker
b894ee77e5 Add package libsqlite3-dev (required for teaching purposes) 2025-11-27 15:40:16 +01:00
Raphael Dannecker
1e57d3c126 Update browser bookmarks (webuntis) 2025-11-27 15:26:32 +01:00
Andreas B. Mundt
9adac239e9 Fix type=user VMs 2025-11-17 12:35:08 +01:00
Andreas B. Mundt
32ddf04fb0 Fixes for trixie livebox images (dracut) 2025-11-17 12:24:27 +01:00
Raphael Dannecker
17ad6c5e1a Prevent login without krb5-ticket on non localhome machines 2025-11-17 12:20:55 +01:00
Raphael Dannecker
71d2ddbb38 Fix screen resolution for C157 2025-10-07 10:32:50 +02:00
Raphael Dannecker
1d7001a505 Implement timeout for krb5 ticket retrieval during VPN connections 2025-10-06 13:11:04 +02:00
Raphael Dannecker
8ab0fe6f79 Restrict outbound traffic in exam mode for c051 devices 2025-10-02 08:50:44 +02:00
Raphael Dannecker
cf6b320f40 Add more links to firefox bookmarks 2025-09-29 12:36:54 +02:00
Raphael Dannecker
04cc3d3e0c Force vminfo.service to run on every vm start 2025-09-29 12:35:23 +02:00
Raphael Dannecker
7ddc8cc12f Due to new media tables, the audio output on some devices has changed 2025-09-22 13:23:34 +02:00
Raphael Dannecker
a78c04d098 No longer output error messages from the vminfo script to stdout
The error messages were corrupting the contents of the .vminfo.json file.
Error messages are now sent to stderr.
2025-09-22 13:17:57 +02:00
Raphael Dannecker
673449026e Fix home directory for localhomes in vminfo.service 2025-09-10 13:02:30 +02:00
Raphael Dannecker
fda7475484 Force use of /lmn/media/USER share for legacy VMs
- Introduced VMLEGACY environment variable to ensure that old VMs
  utilize the legacy media share located at /lmn/media/USER.
- This change is aimed at maintaining compatibility with older
  virtual machines that rely on the previous media share structure.
2025-07-09 10:45:24 +02:00
Raphael Dannecker
2cc80a0946 Sync desktop starters from fileserver instead of server 2025-07-02 14:30:00 +02:00
Raphael Dannecker
2e6996c75b Configure SSSD for hourly ticket lifetime checks and renewal 2025-07-02 14:29:24 +02:00
Raphael Dannecker
8471e34b0f Refactor VM volume mounting
- Replace bind-mounts on /lmn/media/$USER with separate
  mounting for Home and Share SMB shares in the VM.
- Update vm-run to start virtiofsd with /lmn/media/$USER
  (/home/$USER on localhome machines).
- Use vm-vminfo to generate a JSON file containing user
  information, including Username, Groups, printer list
  krb5-ticket and some more
- Configure vminfo.service (systemd-timer) to periodically
  call vm-vminfo.
- Ensure krb5-ticket (TGT) is injected into the Windows VM.
- Mount SMB-Home and SMB-Share shares as part of the new structure.
2025-07-02 14:28:58 +02:00
Raphael Dannecker
48ce882c16 Prevents the --options option in vm-run from interfering with other options 2025-06-05 12:43:22 +02:00
Raphael Dannecker
0a7fd9369c Allow multiple macvtap-VMs to use the same MAC address 2025-06-04 11:08:00 +02:00
Raphael Dannecker
253b5247d8 Configure display resolution / audio out for specific clients 2025-05-14 12:39:43 +02:00
23 changed files with 768 additions and 916 deletions

File diff suppressed because it is too large Load diff

View file

@ -49,7 +49,6 @@
- lmn_network
- role: up2date_debian
tags: upgrade
- lmn_encrypt
- lmn_sssd
- lmn_mount
- lmn_kde
@ -64,7 +63,7 @@
- role: lmn_localhome
when: localhome
- role: lmn_localuser
when: localuser|bool
when: localuser
- role: lmn_exam
when: exam_mode
- role: lmn_wlan
@ -81,17 +80,15 @@
loop_var: rolename
when: custom_roles is defined
- name: Import role security
ansible.builtin.import_role:
name: lmn_security
- name: Import role finish
ansible.builtin.import_role:
name: lmn_finish
- name: Import role tmpfixes
ansible.builtin.import_role:
name: lmn_tmpfixes
- name: Final tasks
ansible.builtin.include_role:
name: "{{ role }}"
loop_control:
loop_var: role
loop:
- lmn_security
- lmn_finish
- lmn_tmpfixes
- name: Apply roles that must run serial

View file

@ -1,15 +0,0 @@
if [[ "$UID" -gt 10000 ]] && [[ ! -f ~/.config/codeblocks/default.conf ]] ; then
mkdir -p ~/.config/codeblocks
cat <<EOF > ~/.config/codeblocks/default.conf
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocksConfig version="1">
<editor>
<FONT>
<str>
<![CDATA[Monospace 18]]>
</str>
</FONT>
</editor>
</CodeBlocksConfig>
EOF
fi

View file

@ -54,7 +54,7 @@ fi
patch="
--- a/$file
+++ b/$file
@@ -98,9 +98,33 @@
@@ -98,9 +98,45 @@
<isSystemItem>true</isSystemItem>
</metadata>
</info>
@ -71,6 +71,18 @@ $HOMEONSERVER
+ <isSystemItem>true</isSystemItem>
+ </metadata>
+ </info>
+ </bookmark>
+ <bookmark href=\"file:///lmn/media/$USER/nextcloud\">
+ <title>Nextcloud</title>
+ <info>
+ <metadata owner=\"http://freedesktop.org\">
+ <bookmark:icon name=\"folder-cloud\"/>
+ </metadata>
+ <metadata owner=\"http://www.kde.org\">
+ <ID>$IDENTITY/${NUM3}</ID>
+ <isSystemItem>true</isSystemItem>
+ </metadata>
+ </info>
+ </bookmark>
<bookmark href=\"remote:/\">
<title>Network</title>

View file

@ -29,6 +29,7 @@
- elpa-magit
- emacs
- filezilla
- freeplane
- git
- git-cola
- gitg
@ -83,7 +84,7 @@
- unison-gtk
- w3m
- wireshark
# - zulucrypt-gui ## no longer in trixie
- zulucrypt-gui
autoremove: true
state: latest
environment:
@ -156,11 +157,6 @@
dest: /etc/profile.d/
mode: '0644'
- name: Copy codeblocks config scripts
ansible.builtin.copy:
src: lmn-codeblocks.sh
dest: /etc/profile.d/
mode: '0644'
- name: Copy fvs-config.js to configure plasma
ansible.builtin.copy:
@ -168,16 +164,6 @@
dest: /usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/fvs-config.js
mode: '0644'
- name: Configure default KDE applications
ansible.builtin.blockinfile:
path: /etc/xdg/mimeapps.list
create: true
mode: '0644'
block: |
[Default Applications]
x-scheme-handler/http=firefox-esr.desktop;
x-scheme-handler/https=firefox-esr.desktop;
x-scheme-handler/mailto=thunderbird.desktop;
- name: Configure some KDE aspects
ansible.builtin.blockinfile:
@ -186,22 +172,13 @@
mode: '0644'
block: |
[KDE]
#SingleClick=false
SingleClick=false
[KDE Action Restrictions][$i]
action/start_new_session=false
action/switch_user=false
#action/switch_user=false
#action/lock_screen=false
- name: Configure NumLock ON
ansible.builtin.blockinfile:
path: /etc/xdg/kcminputrc
create: true
mode: '0644'
block: |
[Keyboard]
NumLock=0
- name: Start with empty session by default
ansible.builtin.copy:
dest: /etc/xdg/ksmserverrc
@ -245,7 +222,7 @@
ansible.builtin.blockinfile:
path: /usr/share/sddm/themes/debian-breeze/Main.qml
marker: // {mark} ANSIBLE MANAGED BLOCK
insertbefore: '^}$'
insertbefore: '\s+//Footer'
block: |
Text {
id: hostname

View file

@ -1,3 +0,0 @@
---
encrypt_passphrase_initial: Muster!
encrypt_tpm2: false

View file

@ -1,5 +0,0 @@
- name: Run update-grub
ansible.builtin.command: update-grub
- name: Run update-dracut
ansible.builtin.command: dracut -f

View file

@ -1,46 +0,0 @@
---
- name: Find device with LUKS holder
vars:
partitions: "{{ item.value.partitions | dict2items | selectattr('value.holders', 'search', 'luks|crypt') }}"
ansible.builtin.set_fact:
encrypt_device: "/dev/disk/by-id/{{ partitions[0].value.links.ids[0] }}"
when:
- item.value.partitions is defined
- item.value.partitions | dict2items | length > 0
- item.value.partitions | dict2items | selectattr('value.holders', 'search', 'luks|crypt') | length > 0
loop: "{{ ansible_devices | dict2items }}"
- name: Get luks slots
ansible.builtin.command:
cmd: "systemd-cryptenroll {{ encrypt_device }}"
register: encrypt_slots_result
changed_when: false
when: encrypt_device is defined
- name: Change Password of Luks password slot
ansible.builtin.command:
cmd: >
systemd-run -P --wait
-p SetCredential=cryptenroll.passphrase:{{ encrypt_passphrase_initial }}
-p SetCredential=cryptenroll.new-passphrase:{{ encrypt_passphrase }}
systemd-cryptenroll --password {{ encrypt_device }} --wipe-slot=password
no_log: true
when:
- encrypt_device is defined
- encrypt_passphrase is defined
- encrypt_slots_result.stdout_lines | length == 2
- encrypt_slots_result.stdout_lines[1].startswith(' 0')
- name: TPM Device Check
ansible.builtin.stat:
path: /dev/tpm0
register: tpm_device
when: encrypt_device is defined
- name: Include TPM2 role
ansible.builtin.include_tasks:
file: tpm2.yml
when:
- encrypt_device is defined
- encrypt_tpm2
- tpm_device.stat.exists

View file

@ -1,42 +0,0 @@
---
- name: Install tpm2-tools and dracut
ansible.builtin.apt:
name:
- tpm2-tools
- dracut
- name: Enable tpm2-tss crypt module on dracut
ansible.builtin.copy:
dest: /etc/dracut.conf.d/crypt.conf
content: add_dracutmodules+=" tpm2-tss crypt "
mode: '0644'
notify: Run update-dracut
- name: Comment out root device in crypttab
ansible.builtin.lineinfile:
dest: /etc/crypttab
regexp: '^([^#].*)'
line: '#\1'
backrefs: true
- name: Insert luks support to GRUB_CMDLINE_LINUX
ansible.builtin.lineinfile:
dest: /etc/default/grub
regexp: '^(GRUB_CMDLINE_LINUX=).*'
line: '\1"rd.auto rd.luks=1"'
backrefs: true
notify: Run update-grub
- name: Insert TPM2 to Luks slot
ansible.builtin.command:
cmd: >
systemd-run -P --wait
-p SetCredential=cryptenroll.passphrase:{{ encrypt_passphrase | default(encrypt_passphrase_initial) }}
systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=7 {{ encrypt_device }} --wipe-slot=tpm2
no_log: true
when: "'tpm2' not in encrypt_slots_result.stdout"
# - name: Update TPM2 Luks slot
# ansible.builtin.command:
# cmd: systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=7+8 --unlock-tpm2-device=auto {{ encrypt_device }} --wipe-slot=tpm2
# when: not grub_config.changed

View file

@ -1,4 +0,0 @@
---
- name: Reboot client
ansible.builtin.command:
cmd: "shutdown -r -t 60"

View file

@ -6,8 +6,6 @@
- "{{ extra_pkgs }}"
- "{{ extra_pkgs1 }}"
- "{{ extra_pkgs2 }}"
tags:
- baseinstall
- name: Add backports for {{ ansible_distribution_release }}
ansible.builtin.apt_repository:
@ -16,7 +14,7 @@
main non-free-firmware
state: present
update_cache: true
when: extra_pkgs_bpo | length > 0 or extra_pkgs_bpo1 | length > 0 or extra_pkgs_bpo2 | length > 0
# when: extra_pkgs_bpo|length
- name: Install extra packages from backports
ansible.builtin.apt:
@ -27,19 +25,6 @@
- "{{ extra_pkgs_bpo }}"
- "{{ extra_pkgs_bpo1 }}"
- "{{ extra_pkgs_bpo2 }}"
when: extra_pkgs_bpo | length > 0 or extra_pkgs_bpo1 | length > 0 or extra_pkgs_bpo2 | length > 0
- name: Check if former ansible-stamp exists
ansible.builtin.stat:
path: /var/local/ansible-stamps
register: stamp_exists
- name: Trigger Reboot if no former ansible-run is found
ansible.builtin.debug:
msg: "First Ansible-Run on Client - Reboot handler started"
changed_when: not stamp_exists.stat.exists
notify: "Reboot client"
- name: Timestamp successfull run and send up-to-date report
ansible.builtin.shell:

View file

@ -6,7 +6,6 @@ kde_desktop_pkg:
- calligra
- codeblocks
- dia
- filius
- flameshot
- freecad
- fritzing
@ -15,9 +14,8 @@ kde_desktop_pkg:
- inkscape
- kde-full
- keepassxc
- kicad
- kicad-doc-de
- librecad
- mu-editor
- openboard
- qtcreator
- spyder
@ -36,5 +34,3 @@ kde_desktop_pkg:
- xdg-desktop-portal-kde
- xdg-desktop-portal-wlr # share screen in browser
- xournalpp
kde_desktop_pkg_bpo: [ ]

View file

@ -8,14 +8,19 @@
repo: deb http://deb.debian.org/debian/ {{ ansible_distribution_release }}-backports main non-free-firmware
state: present
update_cache: true
when: kde_desktop_pkg_bpo | length > 0
- name: Install extra packages from backports
ansible.builtin.apt:
name: "{{ kde_desktop_pkg_bpo }}"
name:
- filius
- kicad
- kicad-doc-de
- libreoffice
- libreoffice-l10n-de
- libreoffice-qt5
state: latest # noqa package-latest
autoremove: true
default_release: "{{ ansible_distribution_release }}-backports"
when: kde_desktop_pkg_bpo | length > 0
- name: Create akonadi config dir

View file

@ -9,7 +9,7 @@
ansible.builtin.blockinfile:
path: /usr/share/sddm/themes/debian-breeze/Main.qml
marker: // {mark} ANSIBLE MANAGED BLOCK localhome
insertbefore: '^}$'
insertbefore: '\s+//Footer'
block: |
Text {
id: localhome
@ -33,6 +33,7 @@
dest: /etc/profile.d/lmn-logout.sh
mode: '0755'
content: |
[[ "${UID}" -gt 10000 ]] && ! findmnt "/lmn/media/${USER}/home" > /dev/null && exit 0
{% if localhome_logout_missing_serverhome %}
[[ "${UID}" -gt 10000 ]] && ! findmnt /srv/samba/schools/default-school > /dev/null && exit 0
{% endif %}

View file

@ -6,10 +6,10 @@ set -eu
cur="$(efibootmgr | grep -Ei 'BootOrder:' | \
sed -E 's/^BootOrder: ([[:xdigit:]]{4}),.+$/\1/')"
pxeip4="$(efibootmgr | grep -Ei "IP.{0,5}4" | \
sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/' | paste -sd, -)"
pxeip4="$(efibootmgr | grep -Ei "IP.*4" | \
sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/')"
debian="$(efibootmgr | grep -Ei "debian" | \
sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/' | paste -sd, -)"
sed -E 's/^Boot([[:xdigit:]]{4}).+$/\1/')"
if [[ "$cur" != "$pxeip4" ]] && [[ -n "$pxeip4" ]] && [[ -n "$debian" ]] ; then
efibootmgr -o $pxeip4,$debian

View file

@ -167,8 +167,6 @@
src: reporter.j2
dest: /usr/local/sbin/reporter
mode: '0755'
tags:
- baseinstall
- name: Provide services and timers for reporter
ansible.builtin.copy:
@ -179,16 +177,12 @@
- reporter.service
- reporter.timer
when: misc_reporter
tags:
- baseinstall
- name: Enable reporter.timer
ansible.builtin.systemd:
name: reporter.timer
enabled: true
when: misc_reporter
tags:
- baseinstall
# Prepare CloneScreen on Presenter PCs

View file

@ -5,8 +5,6 @@
key: "{{ item }}"
loop: "{{ keys2deploy }}"
when: keys2deploy is defined
tags:
- baseinstall
- name: Allow sudo without password for ansible
ansible.builtin.lineinfile:
@ -16,16 +14,12 @@
owner: root
group: root
mode: '0700'
tags:
- baseinstall
- name: Disable ansible user login
ansible.builtin.user:
name: ansible
password_lock: true
when: security_defaultuser_login_disable
tags:
- baseinstall
- name: Limit SSH access to user ansible
ansible.builtin.blockinfile:

View file

@ -1,2 +0,0 @@
---
sssd_domjoin_user: global-admin

View file

@ -13,23 +13,12 @@
mode: '0600'
notify: Restart sssd
- name: Check if the machine account password and the join are still valid
ansible.builtin.shell:
cmd: adcli testjoin -D {{ domain | upper }}
register: adcli_test_result
failed_when: false
changed_when: false
# If domjoin not valid:
## Either one of the variables is defined:
- name: Join the domain
ansible.builtin.shell:
cmd: >
echo "{{ ad_passwd }}" | adcli join --stdin-password -U {{ ad_user }} {{ domain | upper }}
no_log: true
vars:
ad_user: "{{ 'global-admin' if (adpw.user_input | default(ansible_cmdline.adpw) | default('') | length > 0) else sssd_domjoin_user }}"
ad_passwd: "{{ adpw.user_input | default('') if adpw.user_input | default ('') | length > 0 else ansible_cmdline.adpw | default(sssd_domjoin_passwd) | default('') }}"
when:
- adpw.user_input | default('') | length > 0 or
ansible_cmdline.adpw | default(sssd_domjoin_passwd) | default('') | length > 0
- adcli_test_result.rc != 0
echo "{{ ansible_cmdline.adpw | default('') + adpw.user_input | default('') }}" |
adcli join --stdin-password -U global-admin {{ domain | upper }}
when: >
ansible_cmdline.adpw | default('') | length > 0 or
adpw.user_input | default('') | length > 0

View file

@ -16,11 +16,3 @@
export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --use-gl=desktop"
when: ansible_board_vendor == "LENOVO" and
(ansible_board_name == "312D" or ansible_board_name == "312A")
- name: Fix 8086:4909 external graphics card
ansible.builtin.replace:
dest: "/etc/default/grub"
regexp: 'GRUB_CMDLINE_LINUX=""$'
replace: 'GRUB_CMDLINE_LINUX="i915.force_probe=4909"'
notify: Run update-grub
when: ansible_board_vendor == "LENOVO" and ansible_board_name == "32CB"

View file

@ -18,7 +18,6 @@
- mktorrent
- libvirt-daemon-system
- virt-manager
- virt-viewer
- dialog # for vm-netboot menu
- python3-impacket
@ -29,6 +28,32 @@
# insertafter: '#auth_unix_rw = "polkit"'
# notify: reload libvirtd
- name: Configure pam_mount for VM bind mounts
ansible.builtin.blockinfile:
dest: /etc/security/pam_mount.conf.xml
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (bind mounts for VMs) -->"
block: |
<!-- bind mounts for the VMs, setting gid here does not work -->
<volume
path="~"
mountpoint="/lmn/media/%(USER)/home"
options="bind"
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user>{% if localuser %}<user>{{ localuser }}</user>{% endif %}</or></not>
</volume>
<volume
path="/srv/samba/schools/default-school/share"
mountpoint="/lmn/media/%(USER)/share"
options="bind"
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user>{% if localuser %}<user>{{ localuser }}</user>{% endif %}</or></not>
</volume>
<volume
path="/srv/samba/schools/default-school"
mountpoint="/lmn/media/%(USER)/school"
options="bind"
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user>{% if localuser %}<user>{{ localuser }}</user>{% endif %}</or></not>
</volume>
insertafter: "<!-- END ANSIBLE MANAGED BLOCK .* -->"
- name: Use umount script for proper cleanup
ansible.builtin.blockinfile:
dest: /etc/security/pam_mount.conf.xml

View file

@ -29,16 +29,19 @@ if [[ "$CONNECTION_ID" = "VPN-Schule" ]]; then
umask 0002
mkdir -p /srv/samba/schools/default-school
chmod 777 /srv/samba/schools/default-school
mkdir -p "/lmn/media/${USERNAME}/share"
mount -t cifs //server/default-school/ /srv/samba/schools/default-school \
-o "sec=krb5i,cruid=${USERID},user=${USERNAME},uid=${USERID},gid=${GROUPID},file_mode=0700,dir_mode=0700,mfsymlinks,nobrl,actimeo=600,cache=loose,echo_interval=10"
echo "after mount" >&2
mount --bind /srv/samba/schools/default-school/share "/lmn/media/${USERNAME}/share"
SUDO_USER=$USERNAME /usr/local/bin/install-printers.sh
elif [[ "$NM_DISPATCHER_ACTION" = "pre-down" ]]; then
# FIXME: Only umount server when Wireguard-Connection was the only connection to server.
# Dirty fix (works only in fvs-IP-Range)
if ! (ip r s | grep "10.190." | grep -v wg0); then
echo "Try to umount server"
echo "Try to umount server shares"
umount "/lmn/media/${USERNAME}/share"
umount /srv/samba/schools/default-school
fi
fi

View file

@ -3,6 +3,7 @@ set -eu
exit_script() {
echo "unmounting media - terminated by trap!" >> "/tmp/${SUDO_UID}-exit-mount.log"
findmnt "/lmn/media/${SUDO_USER}/share" && umount "/lmn/media/${SUDO_USER}/share"
findmnt "/srv/samba/schools/default-school" && umount "/srv/samba/schools/default-school"
trap - SIGHUP SIGINT SIGTERM # clear the trap
kill -- -$$ # Sends SIGTERM to child/sub processes
@ -13,9 +14,11 @@ findmnt /srv/samba/schools/default-school > /dev/null && exit 0
umask 0002
mkdir -p /srv/samba/schools/default-school
chmod 777 /srv/samba/schools/default-school
mkdir -p "/lmn/media/${SUDO_USER}/share"
mount -t cifs //server/default-school/ /srv/samba/schools/default-school \
-o "sec=krb5i,cruid=${SUDO_UID},user=${SUDO_USER},uid=${SUDO_UID},gid=${SUDO_GID},file_mode=0700,dir_mode=0700,mfsymlinks,nobrl,actimeo=600,cache=loose,echo_interval=10"
mount --bind /srv/samba/schools/default-school/share "/lmn/media/${SUDO_USER}/share"
echo "Einbindung erfolgreich!"
echo "Dieses Fenster bitte nicht schließen!"