diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2026-02-16 16:47:28 +0000 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2026-03-02 16:05:33 +0000 |
| commit | 4b9cd15c6db9290d5e842503464e1d3429d92f37 (patch) | |
| tree | 125dd2b091e9d5d0b612edf9f279d45a1d65eddd | |
| parent | c020178c01c882cc827d42132ca436edf7985031 (diff) | |
Set FIRST_USER_NAME shell to nologin if no password is set
| -rwxr-xr-x | stage1/01-sys-tweaks/00-run.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stage1/01-sys-tweaks/00-run.sh b/stage1/01-sys-tweaks/00-run.sh index b7e5b5e..df07d41 100755 --- a/stage1/01-sys-tweaks/00-run.sh +++ b/stage1/01-sys-tweaks/00-run.sh @@ -4,11 +4,12 @@ install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab" on_chroot << EOF if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then - adduser --disabled-password --gecos "" ${FIRST_USER_NAME} + adduser --disabled-login --gecos "" ${FIRST_USER_NAME} fi if [ -n "${FIRST_USER_PASS}" ]; then echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd + usermod -s /bin/bash "${FIRST_USER_NAME}" fi echo "root:root" | chpasswd EOF |
