diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2022-03-18 15:03:23 +0000 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2022-03-18 15:03:23 +0000 |
| commit | 95ac3cfb3b223dad058c1aee1d8b6e3f5e5b5935 (patch) | |
| tree | 4e67654a462e8dcd5a6a9da7142dbaec6332fdf4 /stage1 | |
| parent | 5d044ba71b7eba33860fdbf222a9a29ae42691e9 (diff) | |
Remove default password
Diffstat (limited to 'stage1')
| -rwxr-xr-x | stage1/01-sys-tweaks/00-run.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stage1/01-sys-tweaks/00-run.sh b/stage1/01-sys-tweaks/00-run.sh index 9c380ec..0f761bd 100755 --- a/stage1/01-sys-tweaks/00-run.sh +++ b/stage1/01-sys-tweaks/00-run.sh @@ -8,7 +8,10 @@ on_chroot << EOF if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then adduser --disabled-password --gecos "" ${FIRST_USER_NAME} fi -echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd + +if [ -n "${FIRST_USER_PASS}" ]; then + echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd +fi echo "root:root" | chpasswd EOF |
