/etc/skel doesn't work?!

Polytropon freebsd at edvax.de
Mon Mar 6 23:24:36 UTC 2017


On Mon, 6 Mar 2017 22:21:45 -0500, Baho Utot wrote:
> 
> On 3/6/2017 2:51 PM, Chris Knipe wrote:
> > Just out of interest...
> >
> > Is there any reason why /etc/skel IS there then?  Other than to create
> > confusion of course.
> >
> > On Mon, Mar 6, 2017 at 9:45 PM, Martin S. Weber <Ephaeton at gmx.net> wrote:
> >
> >> 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
> >> _______________________________________________
> >> freebsd-questions at freebsd.org mailing list
> >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >> To unsubscribe, send any mail to "freebsd-questions-
> >> unsubscribe at freebsd.org"
> >>
> >
> >
> 
> Should /etc/usr/skel be a symlink to /usr/share/skel ?

Sometimes, admins tend to create a symlink from /etc/skel
pointing to /usr/share/skel. The reasoning here probably
is that /usr/share/skel can be subject to system updates
(it's a "system-owned" directory), but /etc/skel is not
considered by updating mechanisms. I have also seen a
symlink to /opt/etc/skel (a derived Solaris-ism) to keep
/usr/share/skel maintained by possible updating, but
manually deal with what /etc/skel@ -> /opt/etc/skel
contains; by changing /etc/skel's target, it's possible
to switch over to system defaults easily, without needing
to touch configuration files for adduser and pw.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list