From owner-freebsd-questions@freebsd.org Mon Mar 6 23:24:36 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FA23CFBFFC for ; Mon, 6 Mar 2017 23:24:36 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay15.qsc.de (mailrelay15.qsc.de [212.99.187.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BFAD18AF for ; Mon, 6 Mar 2017 23:24:35 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay15.qsc.de; Tue, 07 Mar 2017 00:26:08 +0100 Received: from r56.edvax.de (port-92-195-29-65.dynamic.qsc.de [92.195.29.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 91F203CBF9; Tue, 7 Mar 2017 00:24:30 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v26NOTPV005002; Tue, 7 Mar 2017 00:24:29 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 7 Mar 2017 00:24:29 +0100 From: Polytropon To: Baho Utot Cc: freebsd-questions@freebsd.org Subject: Re: /etc/skel doesn't work?! Message-Id: <20170307002429.5caa887e.freebsd@edvax.de> In-Reply-To: <0e5a295f-f78c-dad2-794a-fec839c1e4fc@columbus.rr.com> References: <1488813922.11457.12.camel@inhio.net> <20170306195758.17d83f1d.freebsd@edvax.de> <20170306194515.GA1541@hephaistos.local> <0e5a295f-f78c-dad2-794a-fec839c1e4fc@columbus.rr.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay15.qsc.de with 7F79369F453 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.2281 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 23:24:36 -0000 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 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@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions > >> To unsubscribe, send any mail to "freebsd-questions- > >> unsubscribe@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, ...