glfs/postlfs/config/skel.xml
Larry Lawrence 01600b9607 update to sendmail-8.12.9
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@821 af4574ff-66df-0310-9fd7-8a98e5e911e0
2003-04-05 13:54:02 +00:00

62 lines
2.4 KiB
XML

<sect1 id="postlfs-config-skel">
<?dbhtml filename="skel.html" dir="postlfs"?>
<title>/etc/skel</title>
<para>The <filename>/etc/skel</filename> directory is quite simple
to setup and use. It provides a way to make sure that all new users on
your LFS system begin with the same settings. The
<filename>/etc/skel</filename> directory is used by the
<filename>/usr/sbin/useradd</filename> program.</para>
<para>For more information see <userinput>man useradd</userinput>.</para>
<para>To get started create a <filename>/etc/skel</filename> directory.
Creating the directory as root is the best way to go. Next copy any
files into <filename>/etc/skel</filename> that you want every new user
to have placed in their home drive. Examples include
<filename>.bash_profile</filename>, <filename>.bashrc</filename>,
<filename>.bash_logout</filename>, <filename>dircolors</filename>,
<filename>.inputrc</filename>, and <filename>.vimrc</filename>.</para>
<para>When creating a new user with
<filename>/usr/sbin/useradd</filename> use the <userinput>-m</userinput>
parameter. For example:</para>
<para><screen><userinput>useradd -m -s/bin/bash jwrober</userinput></screen></para>
<para>The <filename>/usr/sbin/useradd</filename> program uses a
collection of default values. It will read them from the
<filename>/etc/default/useradd</filename> file if it exists. If the
file does not exist, then it uses some internal defaults. They can be
found by running <userinput>/usr/sbin/useradd -D</userinput>.</para>
<para>To change these values to something new, create a base
<filename>/etc/default/useradd</filename> file with the same values as
the output of <userinput>/usr/sbin/useradd -D</userinput>. Here is a
sample.</para>
<para><screen># Begin /etc/default/useradd
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=
SKEL=/etc/skel
# End /etc/default/useradd</screen></para>
<para>The only thing missing from the file is a default shell. Add that
by running:</para>
<para><screen><userinput>/usr/sbin/useradd -D -s/bin/bash</userinput></screen></para>
<para>This will set the <userinput>SHELL=</userinput> line to
<userinput>SHELL=/bin/bash</userinput>. This makes it even easier to
add new users to your LFS system. The
<filename>/usr/sbin/useradd</filename> has many parameters that can be
set in the <filename>/etc/default/useradd</filename> file. See the man
page for more details.</para>
</sect1>