/etc/skel doesn't work?!

Martin S. Weber Ephaeton at gmx.net
Mon Mar 6 19:45:28 UTC 2017


On 2017-03-06 19:57:58, Polytropon wrote:
> On Mon, 06 Mar 2017 12:25:22 -0300, ASV wrote:
> > (...)
> > Looks like a bug to me.

Files in /etc/skel are not copied. Default skeleton directory is,
confusingly, /usr/share/skel and not /etc/skel. The value of the
default skeleton directory is neither mentioned in pw's manfile's
-k options, or pw's manpage's FILES section.  It IS, however,
mentioned in pw.conf's manpage.

So, ASV:
touch /etc/skel/etc-skel
touch /usr/share/skel/usr-share-skel
pw useradd asv -m
ls -l /home/asv
# with empty /etc/pw.conf, we expect to see /home/asv/usr-share-skel, but
# not /home/asv/etc-skel. 

FWIW, ASV, I understand your confusion. Fact just is, the default
skeleton directory under FreeBSD is not what one expects when coming
from other worlds. So, yes, any file will get copied, but you need to
put it in the right directory :) And yes, re $SUBJECT, 
"/etc/skel does not work", without further configuration, period.

-> man pw.conf

Regards,
-Martin


More information about the freebsd-questions mailing list