summaryrefslogtreecommitdiff
path: root/osi-mk.d/systemd-osi-shell.sh
diff options
context:
space:
mode:
Diffstat (limited to 'osi-mk.d/systemd-osi-shell.sh')
-rw-r--r--osi-mk.d/systemd-osi-shell.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/osi-mk.d/systemd-osi-shell.sh b/osi-mk.d/systemd-osi-shell.sh
index dc161dc..abba7f9 100644
--- a/osi-mk.d/systemd-osi-shell.sh
+++ b/osi-mk.d/systemd-osi-shell.sh
@@ -31,6 +31,7 @@ systemd-osi-shell:post_install() {
# but we want this to be a real local login with PAM, so use su(1),
# but trick in in to using login(1)'s PAM config. We undo this trick by
# using nsenter(1) to reset the mount namespace after we've done the PAM stuff.
+ # This hardcodes the shell as /bin/bash, which is the default for root.
ExecStart=/bin/unshare --mount -- sh -c 'mount --bind /etc/pam.d/login /etc/pam.d/su && exec -- su -c "exec nsenter --mount --target=1 -- bash -l"'
StandardInput=tty
TTYPath=/dev/ttyS0