diff --git a/pkg/getty/etc/motd b/pkg/getty/etc/motd index 8132011ca..2414d0d94 100644 --- a/pkg/getty/etc/motd +++ b/pkg/getty/etc/motd @@ -1 +1,4 @@ -Welcome to LinuxKit +Welcome to LinuxKit! + +NOTE: This system is namespaced. +The namespace you are currently in may not be the root. diff --git a/pkg/getty/etc/profile.d/namespace.sh b/pkg/getty/etc/profile.d/namespace.sh new file mode 100644 index 000000000..db350f3fa --- /dev/null +++ b/pkg/getty/etc/profile.d/namespace.sh @@ -0,0 +1 @@ +export PS1="(ns: getty) $PS1" diff --git a/pkg/getty/usr/bin/rungetty.sh b/pkg/getty/usr/bin/rungetty.sh index 164554db9..454c0d6e3 100755 --- a/pkg/getty/usr/bin/rungetty.sh +++ b/pkg/getty/usr/bin/rungetty.sh @@ -31,14 +31,14 @@ start_getty() { # are we secure or insecure? loginargs= if [ "$INSECURE" == "true" ]; then - loginargs="-n -l /bin/sh" + loginargs="-a root" fi if ! grep -q -w "$tty" "$securetty"; then echo "$tty" >> "$securetty" fi # respawn forever - infinite_loop setsid.getty -w /sbin/getty $loginargs $line $speed $tty $term & + infinite_loop setsid.getty -w /sbin/agetty $loginargs $line $speed $tty $term & } # check if we have /etc/getty.shadow diff --git a/pkg/sshd/etc/motd b/pkg/sshd/etc/motd index 8132011ca..2414d0d94 100644 --- a/pkg/sshd/etc/motd +++ b/pkg/sshd/etc/motd @@ -1 +1,4 @@ -Welcome to LinuxKit +Welcome to LinuxKit! + +NOTE: This system is namespaced. +The namespace you are currently in may not be the root. diff --git a/pkg/sshd/etc/profile.d/namespace.sh b/pkg/sshd/etc/profile.d/namespace.sh new file mode 100644 index 000000000..45775ea08 --- /dev/null +++ b/pkg/sshd/etc/profile.d/namespace.sh @@ -0,0 +1 @@ +export PS1="(ns: sshd) $PS1"