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:
@@ -32,12 +32,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
|
||||
|
||||
|
Reference in New Issue
Block a user