Ticket #41: skel.xml.patch

File skel.xml.patch, 2.6 KB (added by jwrober@…, 21 years ago)

Initial version of /etc/skel. Includes basic usage and how to setup default file.

  • skel.xml

     
    22<?dbhtml filename="skel.html" dir="postlfs"?>
    33<title>/etc/skel (Skeleton Home Directory Files)</title>
    44
    5 <para>New Page to be written here.</para>
     5<para>Using the <filename>/etc/skel</filename> directory is quite simple
     6to setup and use.  It provides a way to make sure that all new users on
     7your LFS system get the same settings to begin with.  The
     8<filename>/etc/skel</filename> directory is used by the
     9<filename>/usr/sbin/useradd</filename> program.</para>
     10
     11<para>For more information see <filename>man useradd</filename>.</para>
     12
     13<para>To get started create a <filename>/etc/skel</filename> directory.
     14Creating the directory as root is the best way to go.  Next copy any
     15files into <filename>/etc/skel</filename> that you want every new user
     16to have placed in their home drive.  Examples include
     17<filename>.bash_profile</filename>, <filename>.bashrc</filename>,
     18<filename>.bash_logout</filename>, <filename>dircolors</filename>,
     19<filename>.inputrc</filename>, and <filename>.vimrc</filename>.</para>
     20
     21<para>When creating a new user with
     22<filename>/usr/sbin/useradd</filename> use the <userinput>-m</userinput>
     23parameter.  For example:</para>
     24
     25<para><screen>[prompt]#<userinput>useradd -m -s/bin/bash
     26jwrober</userinput></screen></para>
     27
     28<para>The <filename>/usr/sbin/useradd</filename> program uses a
     29collection of default values.  It will read them from the
     30<filename>/etc/default/useradd</filename> file if it exists.  If the
     31file does not exist, then it uses some internal defaults.  They can be
     32found by running <userinput>/usr/sbin/useradd -D</userinput>.</para>
     33
     34<para>To change these values to something new, create a base
     35<filename>/etc/default/useradd</filename> file with the same values as
     36the output of <userinput>/usr/sbin/useradd -D</userinput>.  Here is a
     37sample.</para>
     38
     39<para><screen># Begin /etc/default/useradd
     40
     41GROUP=100
     42HOME=/home
     43INACTIVE=-1
     44EXPIRE=
     45SHELL=
     46SKEL=/etc/skel
     47
     48# End /etc/default/useradd</screen></para>
     49
     50<para>The only thing missing from the file is a default shell.  Add that
     51by running:</para>
     52
     53<para><screen><userinput>/usr/sbin/useradd -D
     54-s/bin/bash</userinput></screen></para>
     55
     56<para>This will set the <userinput>SHELL=</userinput> line to
     57<userinput>SHELL=/bin/bash</userinput>.  This makes it even easier to
     58add new users to your LFS system.  The
     59<filename>/usr/sbin/useradd</filename> has many parameters that can be
     60set in the <filename>/etc/default/useradd</filename> file.  See the man
     61page for more details.</para>
    662
    763</sect1>