From 281e1ca87d9a15df21629203896025d95aed68b8 Mon Sep 17 00:00:00 2001 From: Tero Huttunen Date: Thu, 1 Oct 2026 19:20:02 +0300 Subject: [PATCH] fix login failure --- README.md | 2 ++ .../normal/5070-enable-remote-access.hook.chroot | 7 ++++++- .../etc/nwipe/eternity-project-logo.svg | 13 +++++++++++++ config/includes.chroot/etc/nwipe/eternity-wheel.svg | 7 +++++++ .../system/getty@tty2.service.d/autologin.conf | 3 +++ .../systemd/system/inetd.service.d/ep-eraser.conf | 3 +++ .../etc/systemd/system/ssh.service.d/ep-eraser.conf | 3 +++ .../usr/local/sbin/ep-eraser-remote-setup | 8 +++++++- 8 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 config/includes.chroot/etc/nwipe/eternity-project-logo.svg create mode 100644 config/includes.chroot/etc/nwipe/eternity-wheel.svg create mode 100644 config/includes.chroot/etc/systemd/system/getty@tty2.service.d/autologin.conf create mode 100644 config/includes.chroot/etc/systemd/system/inetd.service.d/ep-eraser.conf create mode 100644 config/includes.chroot/etc/systemd/system/ssh.service.d/ep-eraser.conf diff --git a/README.md b/README.md index b1a8e2a..847840d 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ To brand certificates, place your JPEG logo at `config/includes.chroot/etc/nwipe NetworkManager provides network connectivity; wired Ethernet uses DHCP automatically, and Wi-Fi can be configured with `nmcli device wifi list` followed by `nmcli device wifi connect "SSID" --ask`. The image starts SSH and Telnet servers for the `eraser` account with password `eperaser`; root SSH login is disabled. The account can run only the EP Eraser and nwipe programs through passwordless `sudo`, for example `sudo -n /usr/local/sbin/ep-eraser` or `sudo -n /usr/local/bin/nwipe`. +On the local or VM console, the erasure UI stays on tty1 and tty2 automatically opens a shell as `eraser`. SSH and Telnet startup now waits for the live account password setup to complete. + Telnet sends both passwords and commands without encryption. Use it only on an isolated, trusted internal network; anyone able to monitor that network can capture the credentials. The predefined password is shared by every image built from this configuration, so change it in `config/includes.chroot/usr/local/sbin/ep-eraser-remote-setup` before deploying outside a controlled test environment. Connect with `ssh -t eraser@HOST` or `telnet HOST`. This project intentionally does not include an automatic wipe-all mode. \ No newline at end of file diff --git a/config/hooks/normal/5070-enable-remote-access.hook.chroot b/config/hooks/normal/5070-enable-remote-access.hook.chroot index 99ad2cb..74976c0 100644 --- a/config/hooks/normal/5070-enable-remote-access.hook.chroot +++ b/config/hooks/normal/5070-enable-remote-access.hook.chroot @@ -4,7 +4,12 @@ set -eu chmod 0755 /usr/local/sbin/ep-eraser-remote-setup chmod 0750 /etc/sudoers.d chmod 0440 /etc/sudoers.d/ep-eraser +chmod 0644 /etc/systemd/system/ep-eraser.service /etc/systemd/system/ep-eraser-remote-access.service +chmod 0644 /etc/systemd/system/getty@tty2.service.d/autologin.conf +chmod 0644 /etc/systemd/system/ssh.service.d/ep-eraser.conf +chmod 0644 /etc/systemd/system/inetd.service.d/ep-eraser.conf visudo --check --file=/etc/sudoers install -d -m 0755 /run/sshd sshd -t -systemctl enable ep-eraser-remote-access.service ssh.service inetd.service \ No newline at end of file +systemctl mask getty@tty1.service +systemctl enable ep-eraser-remote-access.service ssh.service inetd.service getty@tty2.service \ No newline at end of file diff --git a/config/includes.chroot/etc/nwipe/eternity-project-logo.svg b/config/includes.chroot/etc/nwipe/eternity-project-logo.svg new file mode 100644 index 0000000..2bc374f --- /dev/null +++ b/config/includes.chroot/etc/nwipe/eternity-project-logo.svg @@ -0,0 +1,13 @@ + + Eternity Project / FI + + + + + + + + ETERNITY + PROJECT / FI + + diff --git a/config/includes.chroot/etc/nwipe/eternity-wheel.svg b/config/includes.chroot/etc/nwipe/eternity-wheel.svg new file mode 100644 index 0000000..4968282 --- /dev/null +++ b/config/includes.chroot/etc/nwipe/eternity-wheel.svg @@ -0,0 +1,7 @@ + + + + + + ∞ + diff --git a/config/includes.chroot/etc/systemd/system/getty@tty2.service.d/autologin.conf b/config/includes.chroot/etc/systemd/system/getty@tty2.service.d/autologin.conf new file mode 100644 index 0000000..2b5cbcc --- /dev/null +++ b/config/includes.chroot/etc/systemd/system/getty@tty2.service.d/autologin.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin eraser --noclear %I $TERM \ No newline at end of file diff --git a/config/includes.chroot/etc/systemd/system/inetd.service.d/ep-eraser.conf b/config/includes.chroot/etc/systemd/system/inetd.service.d/ep-eraser.conf new file mode 100644 index 0000000..48d6739 --- /dev/null +++ b/config/includes.chroot/etc/systemd/system/inetd.service.d/ep-eraser.conf @@ -0,0 +1,3 @@ +[Unit] +Requires=ep-eraser-remote-access.service +After=ep-eraser-remote-access.service \ No newline at end of file diff --git a/config/includes.chroot/etc/systemd/system/ssh.service.d/ep-eraser.conf b/config/includes.chroot/etc/systemd/system/ssh.service.d/ep-eraser.conf new file mode 100644 index 0000000..48d6739 --- /dev/null +++ b/config/includes.chroot/etc/systemd/system/ssh.service.d/ep-eraser.conf @@ -0,0 +1,3 @@ +[Unit] +Requires=ep-eraser-remote-access.service +After=ep-eraser-remote-access.service \ No newline at end of file diff --git a/config/includes.chroot/usr/local/sbin/ep-eraser-remote-setup b/config/includes.chroot/usr/local/sbin/ep-eraser-remote-setup index 556c8a2..ef344c0 100644 --- a/config/includes.chroot/usr/local/sbin/ep-eraser-remote-setup +++ b/config/includes.chroot/usr/local/sbin/ep-eraser-remote-setup @@ -1,4 +1,10 @@ #!/bin/sh set -eu -printf '%s\n' 'eraser:eperaser' | chpasswd \ No newline at end of file +if ! id eraser >/dev/null 2>&1; then + echo 'live-config did not create the eraser account' >&2 + exit 1 +fi + +printf '%s\n' 'eraser:eperaser' | chpasswd +echo 'Password configured for eraser' \ No newline at end of file