fix user creation. now /etc/skel gets copied recursive

This commit is contained in:
Marcus 2023-10-21 20:32:15 +02:00
parent 43b63058f7
commit a0f9525f97

View file

@ -129,16 +129,11 @@ $CHROOTCMD /usr/bin/chmod 755 /root/nanodesk-installer.sh || error
### set root password ### set root password
message "set root password to 'debian'" message "set root password to 'debian'"
$CHROOTCMD 'echo -e "debian\ndebian" | (passwd root)' $CHROOTCMD echo -e "debian\ndebian" | $CHROOTCMD passwd root
### add debian user ### add debian user
message "create user debian" message "create user debian, password 'debian'"
$CHROOTCMD useradd -m -U -s /bin/bash -k /etc/skel debian $CHROOTCMD echo -e "debian\ndebian\nDebian\n\n\n\n\y\n" | $CHROOTCMD adduser debian
### set password
message "set password for user debian to 'debian'"
$CHROOTCMD 'echo -e "debian\ndebian" | (passwd debian)'
message "clear /tmp" message "clear /tmp"
$CHROOTCMD /usr/bin/rm -Rf /tmp/* || error $CHROOTCMD /usr/bin/rm -Rf /tmp/* || error