全部博文(125)
分类: LINUX
2010-08-05 11:45:27
Using /etc/skel
/etc/skel to ensure that all new users on your system get the same initial settings.
The /etc/skel directory is the directory used by useradd to create the default settings in a new user's home directory.
To change the location of /etc/skel, edit /etc/default/useradd.
Code Listing 7.1 |
# useradd defaults file GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel |
Typically files included in /etc/skel are .rc files for shell initialization, but you could also include a public_html directory, a custom dircolors file, or anything else.
Code Listing 7.2 |
% ls -A /etc/skel
.bash_profile .bashrc .maildir .screenrc .tcsh.config |