fix gnome login screen: create admin as a non system user (#4270)

This commit is contained in:
openoms 2023-11-23 14:18:59 +01:00 committed by GitHub
parent 37c8f6f897
commit 9f238868e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -413,7 +413,7 @@ sudo -H python3 -m pip install pytesseract mechanize PySocks urwid Pillow reques
echo -e "\n*** PREPARE ${baseimage} ***" echo -e "\n*** PREPARE ${baseimage} ***"
# make sure the pi user is present # make sure the pi user is present
if [ "$(compgen -u | grep -c pi)" -eq 0 ];then if ! compgen -u pi; then
echo "# Adding the user pi" echo "# Adding the user pi"
adduser --system --group --shell /bin/bash --home /home/pi pi adduser --system --group --shell /bin/bash --home /home/pi pi
# copy the skeleton files for login # copy the skeleton files for login
@ -564,9 +564,9 @@ service rsyslog restart
echo -e "\n*** ADDING MAIN USER admin ***" echo -e "\n*** ADDING MAIN USER admin ***"
# based on https://raspibolt.org/system-configuration.html#add-users # based on https://raspibolt.org/system-configuration.html#add-users
# using the default password 'raspiblitz' # using the default password 'raspiblitz'
adduser --system --group --shell /bin/bash --home /home/admin admin adduser --disabled-password --gecos "" admin
# copy the skeleton files for login # make the home folder world readable
sudo -u admin cp -r /etc/skel/. /home/admin/ chmod 0755 /home/admin
echo "admin:raspiblitz" | chpasswd echo "admin:raspiblitz" | chpasswd
adduser admin sudo adduser admin sudo
chsh admin -s /bin/bash chsh admin -s /bin/bash