|Front | Info | Lists | Newsfeeds | Study Guide | What is BSD?|
This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/Control_which_files_are_copied_to_a_new_user__39__s_home_directory_during_account_creation.html.
Control which files are copied to a new user's home directory during account creation
BSD systems use a "skel" directory containing files which are copied over to a user's home directory when a user account is made. Be aware of the location of the skel directory on each BSD, as well as how to override the copying of its contents during account creation.
A number of files control a user's environment; generally these are "sourced" at login to set variables, aliases, shell prompts and other options, but others may hold information used in processing mail or making remote connections. Generally these files (
As a system administrator, you may wish for your users to all have similar environments set up when they log in --- perhaps colorized file listings, customized mail or program aliases, their own executable path, and so on. Rather than teaching all your users to set iup their own dotfiles/environment, or (perhaps worse) editing all the users' dotfiles yourself, BSD systems have a "skeleton directory" where master copies of the dotfiles are stored. By editing the master dotfiles in this "skel" directory, you can do the editing once and then have these files copied to a new user's $HOME during the
Finding the Dotfiles!
The names and locations of the "dotfiles" vary somewhat in each branch of the BSD's. For FreeBSD and DragonFly, look in /usr/share/skel:
NetBSD and OpenBSD store their "master dotfiles" under
At one time, OpenBSD stored "dotfiles" in /etc/dotfiles. The fact that their dotfiles were/are really dotfiles confused a few people (collected on the Internet, 2007, an archived discussion from some years before):
pw(8), adduser.conf(5), useradd(8) or adduser(8), and usermgmt.conf(5)