diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2022-07-26 12:08:25 +0100 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2022-07-26 12:08:25 +0100 |
| commit | fb582e2e670a0b5fbc40d4329a7e56e15d944774 (patch) | |
| tree | 0cf70760beb0f1d376ff28ce13dab8b09754cb5b /build.sh | |
| parent | ca06d62f2ef63bd00b5729e48c64a2688e46ae14 (diff) | |
| parent | 01b2432007766a6a1acc942f62d4ece7b25e560d (diff) | |
Merge remote-tracking branch 'origin/master' into arm64
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -225,6 +225,7 @@ export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi} export FIRST_USER_NAME=${FIRST_USER_NAME:-pi} export FIRST_USER_PASS +export DISABLE_FIRST_BOOT_USER_RENAME=${DISABLE_FIRST_BOOT_USER_RENAME:-0} export RELEASE=${RELEASE:-bullseye} export WPA_ESSID export WPA_PASSWORD @@ -290,6 +291,17 @@ if [[ ! "$FIRST_USER_NAME" =~ ^[a-z][-a-z0-9_]*$ ]]; then exit 1 fi +if [[ "$DISABLE_FIRST_BOOT_USER_RENAME" == "1" ]] && [ -z "${FIRST_USER_PASS}" ]; then + echo "To disable user rename on first boot, FIRST_USER_PASS needs to be set" + echo "Not setting FIRST_USER_PASS makes your system vulnerable and open to cyberattacks" + exit 1 +fi + +if [[ "$DISABLE_FIRST_BOOT_USER_RENAME" == "1" ]]; then + echo "User rename on the first boot is disabled" + echo "Be advised of the security risks linked to shipping a device with default username/password set." +fi + if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then echo "Could not reach APT_PROXY server: ${APT_PROXY}" exit 1 |
