Refactor default user creation

- FIXME: why does the kickstart fail to create a user with appliance-tools?
This commit is contained in:
Mark Verlinde 2021-06-29 22:10:47 +02:00
parent b9bb3b7090
commit 7d83ec6dbc

View File

@ -25,7 +25,8 @@ repo --name="Rpi-Kernel" --baseurl=https://rocky.lowend.ninja/RockyRpi/Rpi-Kerne
install install
keyboard us --xlayouts=us --vckeymap=us keyboard us --xlayouts=us --vckeymap=us
rootpw --lock rootpw --lock
user --name="rocky" --password="rockylinux" --plaintext --gecos="Rocky default user" --groups=wheel --uid=1000 # FIXME user creation here does not work ?
# user --name="rocky" --password="rockylinux" --plaintext --gecos="Rocky default user" --groups=wheel --uid=1000
timezone --isUtc --nontp UTC timezone --isUtc --nontp UTC
selinux --enforcing selinux --enforcing
firewall --enabled --port=22:tcp firewall --enabled --port=22:tcp
@ -66,12 +67,10 @@ EOF
# Run this once to fix the wifi: # Run this once to fix the wifi:
sed -i 's/boardflags3=0x48200100/boardflags3=0x44200100/g' /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt sed -i 's/boardflags3=0x48200100/boardflags3=0x44200100/g' /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
# Apparently kickstart user was not working, attempt to do it here?
/sbin/useradd -c "Rocky Linux default user" -u 1000 -G wheel -m -U rocky
echo "rockylinux" | passwd --stdin rocky
mkdir -p /home/rocky # Apparently kickstart user was not working, attempt to do it here?
chown 1000:1000 /home/rocky /sbin/useradd -c "Rocky Linux default user" -G wheel -m -U rocky
echo "rockylinux" | passwd --stdin rocky
# Need to write several files to help with various things here. # Need to write several files to help with various things here.
@ -105,7 +104,7 @@ It should fill your main rootfs partition to the end of the disk.
EOF EOF
chown 1000 /home/rocky/README chown -R rocky:rocky /home/rocky
# Add rpi-kernel repo: # Add rpi-kernel repo: