update upstream to 9084a3cbc0a55422beea4a55b530c1f03a910617 feb 2024
[automated-distro-installer] / fai / config / scripts / DEMO / 10-misc
index 42f47494164fcbb569472457b139ef586748738f..ed2a810016a9f24d2e2d988fac10167cf8367732 100755 (executable)
@@ -17,18 +17,18 @@ fi
 # add additional user account
 if [ -n "$username" ]; then
     if ! $ROOTCMD getent passwd $username ; then
-       $ROOTCMD adduser --disabled-login --gecos "$username user" $username
+       $ROOTCMD adduser --disabled-password --gecos "$username user" $username
        $ROOTCMD usermod -p "$USERPW" $username
        userdir=$($ROOTCMD getent passwd "$username" | cut -d: -f6 )
 
        # disable xfce question about default or empty panel
        if [ -f $target/etc/xdg/xfce4/panel/default.xml ]; then
            xfdir=$userdir/.config/xfce4/xfconf/xfce-perchannel-xml
-           if [ ! -d $target/xfdir ]; then
+           if [ ! -d $target/$xfdir ]; then
                $ROOTCMD mkdir -p $xfdir
                $ROOTCMD cp /etc/xdg/xfce4/panel/default.xml $xfdir/xfce4-panel.xml
                # group name is the same as user name
-               $ROOTCMD chown -R $username.$username $userdir/.config
+               $ROOTCMD chown -R $username:$username $userdir/.config
            fi
        fi