hidden file/directory
if [ ! -d /home/$USER ]; then
mkdir -p /home/$USERfi
cp -a /etc/skel/* /home/$USER
chown -R $USER:users /home/$USER
should be "cp -a /etc/skel /home/$USER"
1.
root@slitaz:~ # mkdir -p /home/test
root@slitaz:~ # cp -a /etc/skel/* /home/test
root@slitaz:~ # ls -a /home/test
. Desktop Downloads Music Templates
.. Documents Images Public Videos
2.
root@slitaz:~ # ls -a /etc/skel
. Documents .isomaster Templates
.. Downloads .local Videos
.bashrc .gtk-bookmarks .mhwaveedit .Xdefaults
.cache .gtkrc-2.0 Music .xinitrc
.config .gtkrc-2.0.mine .profile .Xresources
Desktop Images Public .xsession
3.
root@slitaz:~ # cp -a /etc/skel /home/temp
root@slitaz:~ # ls -a /home/temp
. Documents .isomaster Templates
.. Downloads .local Videos
.bashrc .gtk-bookmarks .mhwaveedit .Xdefaults
.cache .gtkrc-2.0 Music .xinitrc
.config .gtkrc-2.0.mine .profile .Xresources
Desktop Images Public .xsession
root@slitaz:~ #