Re: More advanced home directory creation in Debian?
On 2010-09-10, Jerome Warnier wrote: > On Sun, 2010-08-22 at 19:00 -0300, Fernando Lemos wrote: >> On Sun, Aug 22, 2010 at 6:40 PM, Christoph Anton Mitterer >> wrote: >> > You're aware that not only .bash_* and .profile can be distributed >> > by /etc/skel,... but any other config file (e.g. .vimrc) a specific site >> > or organisation may found useful for their users? >> > Or a predefined directory structure,... ssh config perhaps specific for >> > each user? >> /etc/skel is used to populate user home directories on user creation, >> nothing more. For system-wide settings , use /etc (e.g. >> /etc/vim/vimrc.local). Use site-specific scripts for any more >> convoluted needs you might have. There's nothing to be discussed about >> this, really. > Think about places where the home is on a server, while /etc is on local > workstations. > You need to extend your vision. I don't think it's sensible to rely on changes in /etc/skel to be propagated somewhen to /home at user creation time for any sane organization-wide configuration setting. One tries to distribute configuration files to /etc on all machines organization-wide to get a similar configuration. Kind regards, Philipp Kern -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrni8n0bb.8ni.tr...@kelgar.0x539.de
Re: More advanced home directory creation in Debian?
On Sun, 2010-08-22 at 19:00 -0300, Fernando Lemos wrote: > On Sun, Aug 22, 2010 at 6:40 PM, Christoph Anton Mitterer > wrote: > > You're aware that not only .bash_* and .profile can be distributed > > by /etc/skel,... but any other config file (e.g. .vimrc) a specific site > > or organisation may found useful for their users? > > Or a predefined directory structure,... ssh config perhaps specific for > > each user? > > /etc/skel is used to populate user home directories on user creation, > nothing more. For system-wide settings , use /etc (e.g. > /etc/vim/vimrc.local). Use site-specific scripts for any more > convoluted needs you might have. There's nothing to be discussed about > this, really. Think about places where the home is on a server, while /etc is on local workstations. You need to extend your vision. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1284146874.1939.1.ca...@fbrt233-laptop
Re: More advanced home directory creation in Debian?
On Sun, Aug 22, 2010 at 6:40 PM, Christoph Anton Mitterer wrote: > You're aware that not only .bash_* and .profile can be distributed > by /etc/skel,... but any other config file (e.g. .vimrc) a specific site > or organisation may found useful for their users? > Or a predefined directory structure,... ssh config perhaps specific for > each user? /etc/skel is used to populate user home directories on user creation, nothing more. For system-wide settings , use /etc (e.g. /etc/vim/vimrc.local). Use site-specific scripts for any more convoluted needs you might have. There's nothing to be discussed about this, really. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlkti=sdtfz9w_2rkq7ngx-ic6b0ne6n74pks1tu...@mail.gmail.com
Re: More advanced home directory creation in Debian?
You're aware that not only .bash_* and .profile can be distributed by /etc/skel,... but any other config file (e.g. .vimrc) a specific site or organisation may found useful for their users? Or a predefined directory structure,... ssh config perhaps specific for each user? Cheers, Chris. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1282513217.3227.14.ca...@fermat.scientia.net
Re: More advanced home directory creation in Debian?
On Sun, Aug 22, 2010 at 3:29 PM, Lars Wirzenius wrote: > (My own preference would be to create all home directories as completely > empty, not even using /etc/skel, and fix all applications that need a > file to create one on demand.) There's no "need" for any of the files in /etc/skel, so there's nothing that needs fixing. /etc/skel these days is mostly distro-specific defaults that users expect to see (a better PS1, for example, or aliases like ls --color). For that same reason, there's no need to update files in user directories. Important stuff goes to login.defs or /etc/profile or maybe elsewhere, you can have a very functional setup with zero files in ~. Regards, -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktik-abqlf4egqcgwdbxv3qhajhm-ybsqtoat+...@mail.gmail.com
Re: More advanced home directory creation in Debian?
On Mon, 2010-08-23 at 06:29 +1200, Lars Wirzenius wrote: > Out of curiosity, since this does not affect me directly: is there a > need to update existing home directories? For example, if one adds new > files to /etc/skel, those only affect new home directories created after > the fact, the existing ones won't have the file anyway. Is there ever a > need for adding the file to existing homes? Though I'd like that,... it would probably a little bit bad,... (at least if done wrong). The home-dir is intended to be under the control of the user. Updating that without asking him could be bad. So something like that would have to be something interactive, asking for permission. Cheers, Chris. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1282504762.3236.65.ca...@fermat.scientia.net
Re: More advanced home directory creation in Debian?
On su, 2010-08-22 at 13:37 +0200, Jerome Warnier wrote: > I second this, as I feel the need to have some hook to create the home > "directory". Out of curiosity, since this does not affect me directly: is there a need to update existing home directories? For example, if one adds new files to /etc/skel, those only affect new home directories created after the fact, the existing ones won't have the file anyway. Is there ever a need for adding the file to existing homes? (My own preference would be to create all home directories as completely empty, not even using /etc/skel, and fix all applications that need a file to create one on demand.) -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1282501779.12989.376.ca...@havelock
Re: More advanced home directory creation in Debian?
On Sun, 2010-08-15 at 15:42 +0200, Christoph Anton Mitterer wrote: > Hi. > > I'd like the idea... it would make home-dir creation here at the faculty > a lot more easier. > > On Tue, 2010-08-03 at 11:08 +0200, Petter Reinholdtsen wrote: > > The location could for example be /etc/skel.d/ > I'd however suggest e.g. /etc/adduser.d or so... or at least not skel.d > Conceptually the skel contents are copied to the homedir, which the > skel.d contents are not but that's just cosmetics. I second this, as I feel the need to have some hook to create the home "directory". Recently, with ZFS or Btrfs (I imagine for this one, did not check myself) or remotely-stored (ex.: NFS) homes, it makes sense to have some local script to create them, not only something to fill them up with stuff. I was thinking into uglily patching my own adduser, but it's definitely worst something more generic, as many people might benefit from it. > Cheers, > Chris. PS: sorry for the cross-posting, but I feel the debian-...@d.o should be aware of this topic. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1282477072.1998.108.ca...@fbrt233-laptop
Re: More advanced home directory creation in Debian?
Ben Hutchings writes ("Re: More advanced home directory creation in Debian?"): > On Fri, Aug 13, 2010 at 03:41:45PM +0100, Ian Jackson wrote: > > One problem is that run-parts does not currently support passing > > arguments to its scripts: > > It does; use the --arg option. So it does. Urgh, what a horrid syntax! I admit that I assumed that you'd pass the arguments as arguments ... Ian. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/19561.5086.210765.857...@chiark.greenend.org.uk
Re: More advanced home directory creation in Debian?
Hi. I'd like the idea... it would make home-dir creation here at the faculty a lot more easier. On Tue, 2010-08-03 at 11:08 +0200, Petter Reinholdtsen wrote: > The location could for example be /etc/skel.d/ I'd however suggest e.g. /etc/adduser.d or so... or at least not skel.d Conceptually the skel contents are copied to the homedir, which the skel.d contents are not but that's just cosmetics. Cheers, Chris. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1281879737.3284.129.ca...@fermat.scientia.net
Re: More advanced home directory creation in Debian?
On Fri, Aug 13, 2010 at 03:41:45PM +0100, Ian Jackson wrote: > Marc Haber writes ("Re: More advanced home directory creation in Debian?"): [...] > > I guess that the adduser maintainers might apply a patch to adduser > > introducing a second hook which is not in /usr/local, and then one of > > your packages could ship such a hook which run-parts your own .d > > directory. > > Or just a direct patch to adduser which makes to run-parts if > run-parts and the directory both exist. > > One problem is that run-parts does not currently support passing > arguments to its scripts: [...] It does; use the --arg option. Ben. -- Ben Hutchings We get into the habit of living before acquiring the habit of thinking. - Albert Camus -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20100813165437.gb5...@decadent.org.uk
Re: More advanced home directory creation in Debian?
Marc Haber writes ("Re: More advanced home directory creation in Debian?"): > On Tue, 10 Aug 2010 22:36:58 +0200, Petter Reinholdtsen > wrote: > >[Ian Jackson] > >> So while it doesn't use run-parts, it's halfway there already. I > >> use adduser.local on chiark. > > > >Definitely useful, but not enought, as the debian-edu-config package > >would break policy if it included a file in /usr/local/, and only one > >package can provide this script at the time while I expect to include > >several scripts to adjust parts of the created home directory, so we > >could not provide a package for the universtity setup while also > >having debian-edu-config intstalled. For this, I believe a .d > >directory with scripts executed by run-parts is needed. Yes. > I guess that the adduser maintainers might apply a patch to adduser > introducing a second hook which is not in /usr/local, and then one of > your packages could ship such a hook which run-parts your own .d > directory. Or just a direct patch to adduser which makes to run-parts if run-parts and the directory both exist. One problem is that run-parts does not currently support passing arguments to its scripts: chiark:~> run-parts /dev/enoent/1 some arguments run-parts: missing operand Try `run-parts --help' for more information. chiark:~> run-parts /dev/enoent/1 run-parts: failed to open directory /dev/enoent/1: No such file or directory chiark:~> run-parts run-parts: missing operand Try `run-parts --help' for more information. chiark:~> but that feature could be added easily enough. Ian. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/19557.22953.434417.999...@chiark.greenend.org.uk
Re: More advanced home directory creation in Debian?
On Tue, 10 Aug 2010 22:36:58 +0200, Petter Reinholdtsen wrote: >[Ian Jackson] >> So while it doesn't use run-parts, it's halfway there already. I >> use adduser.local on chiark. > >Definitely useful, but not enought, as the debian-edu-config package >would break policy if it included a file in /usr/local/, and only one >package can provide this script at the time while I expect to include >several scripts to adjust parts of the created home directory, so we >could not provide a package for the universtity setup while also >having debian-edu-config intstalled. For this, I believe a .d >directory with scripts executed by run-parts is needed. I guess that the adduser maintainers might apply a patch to adduser introducing a second hook which is not in /usr/local, and then one of your packages could ship such a hook which run-parts your own .d directory. Greetings Marc -- -- !! No courtesy copies, please !! - Marc Haber | " Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/ Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1ojv0p-0006if...@swivel.zugschlus.de
Re: More advanced home directory creation in Debian?
[Ian Jackson] > So while it doesn't use run-parts, it's halfway there already. I > use adduser.local on chiark. Definitely useful, but not enought, as the debian-edu-config package would break policy if it included a file in /usr/local/, and only one package can provide this script at the time while I expect to include several scripts to adjust parts of the created home directory, so we could not provide a package for the universtity setup while also having debian-edu-config intstalled. For this, I believe a .d directory with scripts executed by run-parts is needed. It could either be in /etc/, or in /usr/lib/, or perhaps in both these locations. Say /usr/lib/adduser/skel.d/ for debian-edu-config and our university package, and /etc/skel.d/ for host specific setup? To make it easy to get right for adduser libpam-mklocaluser and pam_mkhomedir and other systems that should use it, I believe it would be best to create a new script doing the work, which could be called mkhomedir or something like that. It would make sure all these systems create home directories the same way. Not sure what arguments the scripts should get, but the path to the new home directory and the name of the user being created is a must. It would also be used by tools creating users in LDAP and NIS, which would first create the entry in LDAP or NIS, and then create the home directory using this new script. Anyone else that would find such mechanism useful to have in Debian? Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20100810203658.gd18...@login1.uio.no
Re: More advanced home directory creation in Debian?
Petter Reinholdtsen writes ("More advanced home directory creation in Debian?"): > It would be nice if all the tools copying /etc/skel/ also had a common > location for their "post-creating" scripts, making sure users created > by for example adduser, lwat, libpam-mkhomedir and libpam-mklocaluser > get the same content. >From adduser(8): If the file /usr/local/sbin/adduser.local exists, it will be executed after the user account has been set up in order to do any local setup. The arguments passed to adduser.local are: username uid gid home-directory The environment variable VERBOSE is set according to the following rule: 0 if --quiet is specified 1 if neither --quiet nor --debug is specified 2 if --debug is specified (The same applies to the variable DEBUG, but DEBUG is deprecated and will be removed in a later version of adduser.) So while it doesn't use run-parts, it's halfway there already. I use adduser.local on chiark. Ian. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/19553.37625.140453.815...@chiark.greenend.org.uk
More advanced home directory creation in Debian?
I got this idea from Debian Edu, where we need to run scripts when a user is created to create files adjusted for each user, and we would like this to work with any tool used to create users. At the moment, a users home directory is created by adduser and other tools by copying the content of /etc/skel to the freshly created home directory, and the ownership of the files are set to the created user. Some tools will run some scripts after /etc/skel/ is created, but the location of these scripts differ from system to system. This of cause causes the created users home directories to have different content depending on how they are created. Typical use cases are setting up mail client to use the correct mail server and other connection defaults and adding KDE and Gnome shortcuts to the network home directory for a user. It would be nice if all the tools copying /etc/skel/ also had a common location for their "post-creating" scripts, making sure users created by for example adduser, lwat, libpam-mkhomedir and libpam-mklocaluser get the same content. The location could for example be /etc/skel.d/, and the scripts should be called with the path to the new home directory, the name of the user, and uid and gid of the user, and perhaps some more information that is needed. This information could either be arguments, or stored in the environment. Are there better ways to do this? If this is a good idea, I suggest we extend adduser in Debian to use it first, and then move on to change other packages to use this location too. I suspect it is best to create a new tool for creating the home directory, to make sure all user creation tools call these .d scripts the same way. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2flzkx43vx5@login2.uio.no