Allow setting user name and password from config

Add FIRST_USER_NAME and FIRST_USER_PASS variables that can be set
in the config (or enviroment). Defaults to the standard pi and
raspberry.
This commit is contained in:
Sam Tygier
2019-01-01 22:00:28 -08:00
committed by Peter Johnson
parent 5c8fb97259
commit bc7971ef03
4 changed files with 16 additions and 6 deletions
+3 -3
View File
@@ -62,12 +62,12 @@ systemctl enable resize2fs_once
EOF
fi
on_chroot << \EOF
on_chroot <<EOF
for GRP in input spi i2c gpio; do
groupadd -f -r "$GRP"
groupadd -f -r "\$GRP"
done
for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev; do
adduser pi $GRP
adduser $FIRST_USER_NAME \$GRP
done
EOF