source: postlfs/config/skel.xml@ 98e3bd5

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb v1_0 v5_0 v5_0-pre1 v5_1 v5_1-pre1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 98e3bd5 was 5e1c345, checked in by Larry Lawrence <larry@…>, 21 years ago

edits, added gdm symlinks

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@811 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 2.4 KB
Line 
1<sect1 id="postlfs-config-skel">
2<?dbhtml filename="skel.html" dir="postlfs"?>
3<title>/etc/skel</title>
4
5<para>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 begin with the same settings. 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 jwrober</userinput></screen></para>
26
27<para>The <filename>/usr/sbin/useradd</filename> program uses a
28collection of default values. It will read them from the
29<filename>/etc/default/useradd</filename> file if it exists. If the
30file does not exist, then it uses some internal defaults. They can be
31found by running <userinput>/usr/sbin/useradd -D</userinput>.</para>
32
33<para>To change these values to something new, create a base
34<filename>/etc/default/useradd</filename> file with the same values as
35the output of <userinput>/usr/sbin/useradd -D</userinput>. Here is a
36sample.</para>
37
38<para><screen># Begin /etc/default/useradd
39
40GROUP=100
41HOME=/home
42INACTIVE=-1
43EXPIRE=
44SHELL=
45SKEL=/etc/skel
46
47# End /etc/default/useradd</screen></para>
48
49<para>The only thing missing from the file is a default shell. Add that
50by running:</para>
51
52<para><screen><userinput>/usr/sbin/useradd -D -s/bin/bash</userinput></screen></para>
53
54<para>This will set the <userinput>SHELL=</userinput> line to
55<userinput>SHELL=/bin/bash</userinput>. This makes it even easier to
56add new users to your LFS system. The
57<filename>/usr/sbin/useradd</filename> has many parameters that can be
58set in the <filename>/etc/default/useradd</filename> file. See the man
59page for more details.</para>
60
61</sect1>
Note: See TracBrowser for help on using the repository browser.