From owner-freebsd-questions@FreeBSD.ORG Mon Sep 22 20:11:49 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4CF0818 for ; Mon, 22 Sep 2014 20:11:49 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 661F4D0 for ; Mon, 22 Sep 2014 20:11:48 +0000 (UTC) Received: from r56.edvax.de (port-92-195-162-184.dynamic.qsc.de [92.195.162.184]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id D5D4024F62; Mon, 22 Sep 2014 22:11:39 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s8MKBcNi001991; Mon, 22 Sep 2014 22:11:39 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 22 Sep 2014 22:11:38 +0200 From: Polytropon To: Dave Babb Subject: Re: Cloning a user Message-Id: <20140922221138.cb34493e.freebsd@edvax.de> In-Reply-To: <5420760C.5000901@comcast.net> References: <54206EFE.2020300@comcast.net> <64800696-2AB1-4B0E-9C17-D76AE07880BE@mac.com> <5420760C.5000901@comcast.net> 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 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2014 20:11:49 -0000 On Mon, 22 Sep 2014 13:18:36 -0600, Dave Babb wrote: > I also want to clone the MATE configuration and the desktop > settings.........Just not the email settings. This is also possible with the /etc/skel mechanism that programs like useradd or pw can work with. First create a "sample user" and check that everything works as you intend. Then copy the required information (files and subtrees, also partial) to /etc/skel. If something starts with a dot '.' (at the top level of the skel/ subtree), replace it by "dot.". See /usr/share/skel for how such a structure has to look like. Put everything in there what you need, except for example e-mail settings or browser configuration. Additionally, examine the files (!) for absolute paths. For example, if your "sample user" has the name "skeltemp", search for that string in all files. If it's present somewhere, for example as a reference "/home/skeltemp", replace it with '~', the abbreviation for the home directory. This will make sure that, after being instantiated for a user named "bob", all references to the former "skeltemp" are gone. Sidenote: If there is something you want to set globally, for example, shell configurations, you can do that at the files in /etc, for example /etc/csh.cshrc; then the user's .cshrc (in the skeleton: dot.cshrc) can be empty and only needs alteration if a preset should be overridden. And allow me a polite note regarding the answering policy (or "common suggestion") of this list: A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? I see you're using Thunderbird - it's perfectly able to properly quote, trim, and answer. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...