Dr. Werner Fink changed bug 1173321
What Removed Added
Flags needinfo?(werner@suse.com)  

Comment # 18 on bug 1173321 from
(In reply to Stefan Dirsch from comment #11)
> Created attachment 841688 [details]
> useradd.local.patch
> 
> This patch for useradd.local implements copying of skel files from
> /usr/etc/skel, which don't exist in /etc/skel.

With

  shopt -s dotglob

it would be possible to use

  shopt -s dotglob
  for file in ${USRSKELDIR}/*; do
      file=${file##*/}
      # Only copy if not exist yet, i.e. does *not* exist in /etc/skel, which
is still
      # being preferred ...
      test -e $HOMEDIR/$file && continue
      cp -a $USRSKELDIR/$file $HOMEDIR
      chown -R $USER.$GID $HOMEDIR/$file
  done


You are receiving this mail because: