source: BOOK/boot/common/pwdgroup.xml@ ca8dde0

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since ca8dde0 was ef54ce8, checked in by William Harrington <kb0iic@…>, 11 years ago

Replace gid-nobody with gid-nogroup.

  • Property mode set to 100644
File size: 6.7 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-boot-pwdgroup">
9 <?dbhtml filename="pwdgroup.html"?>
10
[8a62e94]11 <title>Creating the passwd and group Files</title>
[3f8be484]12
13 <indexterm zone="ch-boot-pwdgroup">
[91ad4a4]14 <primary sortas="e-/etc/passwd">/etc/passwd</primary>
[3f8be484]15 </indexterm>
16
17 <indexterm zone="ch-boot-pwdgroup">
[91ad4a4]18 <primary sortas="e-/etc/group">/etc/group</primary>
[3f8be484]19 </indexterm>
20
[934e597]21 <para os="a">In order for user <systemitem class="username">root</systemitem> to
[3f8be484]22 be able to login and for the name <quote>root</quote> to be recognized,
[91ad4a4]23 there must be relevant entries in the <filename>/etc/passwd</filename>
24 and <filename>/etc/group</filename> files.</para>
[3f8be484]25
[3f76cac]26 <para>Create the <filename>${CLFS}/etc/passwd</filename> file by running
[3f8be484]27 the following command:</para>
28
[3f76cac]29<screen><userinput>cat &gt; ${CLFS}/etc/passwd &lt;&lt; "EOF"
[8f1ae86]30<literal>root:x:&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
[27f57ec]31<literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
[65018363]32EOF</userinput></screen>
33
[934e597]34 <para os="b">The actual password for <systemitem class="username">root</systemitem>
[d1ff581]35 (the <quote>::</quote> used here is just a placeholder and allows you to login
[b2011e5]36 with no password) will be set later.</para>
[3f8be484]37
[934e597]38 <variablelist os="c">
[04fe8e5]39
[a709a94]40 <title>Additional users you may want to add if not already included:</title>
[04fe8e5]41
42 <varlistentry>
[8f1ae86]43 <term><literal>bin:x:&uid-bin;:&gid-bin;:bin:/bin:/bin/false</literal></term>
[04fe8e5]44 <listitem>
[9b020e6]45 <para>Can be useful for compatibility with legacy applications.</para>
[04fe8e5]46 </listitem>
47 </varlistentry>
48 <varlistentry>
[8f1ae86]49 <term><literal>daemon:x:&uid-daemon;:&gid-daemon;:daemon:/sbin:/bin/false</literal></term>
[04fe8e5]50 <listitem>
[9b020e6]51 <para>It is often recommended to use an unprivileged User ID/Group ID
52 for daemons to run as, in order to limit their access to the system.</para>
[04fe8e5]53 </listitem>
54 </varlistentry>
55 <varlistentry>
[8f1ae86]56 <term><literal>adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false</literal></term>
[04fe8e5]57 <listitem>
[292da92]58 <para>Was used for programs that performed administrative tasks.</para>
[04fe8e5]59 </listitem>
60 </varlistentry>
61 <varlistentry>
[8f1ae86]62 <term><literal>lp:x:&uid-lp;:&gid-lp;:lp:/var/spool/lp:/bin/false</literal></term>
[04fe8e5]63 <listitem>
[b2011e5]64 <para>Used by programs for printing</para>
[04fe8e5]65 </listitem>
66 </varlistentry>
67 <varlistentry>
[8f1ae86]68 <term><literal>mail:x:&uid-mail;:&gid-mail;:mail:/var/mail:/bin/false</literal></term>
[04fe8e5]69 <listitem>
[b2011e5]70 <para>Often used by email programs</para>
[04fe8e5]71 </listitem>
72 </varlistentry>
73 <varlistentry>
[8f1ae86]74 <term><literal>news:x:&uid-news;:&gid-news;:news:/var/spool/news:/bin/false</literal></term>
[04fe8e5]75 <listitem>
[292da92]76 <para>Often used for network news servers</para>
[04fe8e5]77 </listitem>
78 </varlistentry>
79 <varlistentry>
[8f1ae86]80 <term><literal>operator:x:&uid-operator;:&gid-root;:operator:/root:/bin/bash</literal></term>
[04fe8e5]81 <listitem>
[292da92]82 <para>Often used to allow system operators to access the system</para>
[04fe8e5]83 </listitem>
84 </varlistentry>
85 <varlistentry>
[8f1ae86]86 <term><literal>postmaster:x:&uid-postmaster;:&gid-mail;:postmaster:/var/spool/mail:/bin/false</literal></term>
[04fe8e5]87 <listitem>
[9b020e6]88 <para>Generally used as an account that receives all the information of troubles with the mail server</para>
[04fe8e5]89 </listitem>
90 </varlistentry>
91 <varlistentry>
[ef54ce8]92 <term><literal>nobody:x:&uid-nobody;:&gid-nogroup;:nobody:/:/bin/false</literal></term>
[04fe8e5]93 <listitem>
[9b020e6]94 <para>Used by NFS</para>
[04fe8e5]95 </listitem>
96 </varlistentry>
97 </variablelist>
98
[ca77da8]99 <para>Create the <filename>${CLFS}/etc/group</filename> file by running
[3f8be484]100 the following command:</para>
101
[3f76cac]102<screen><userinput>cat &gt; ${CLFS}/etc/group &lt;&lt; "EOF"
[65018363]103<literal>root:x:0:
[8f1ae86]104bin:x:&gid-bin;:
105sys:x:&gid-sys;:
106kmem:x:&gid-kmem;:
107tty:x:&gid-tty;:
108tape:x:&gid-tape;:
109daemon:x:&gid-daemon;:
110floppy:x:&gid-floppy;:
111disk:x:&gid-disk;:
112lp:x:&gid-lp;:
113dialout:x:&gid-dialout;:
114audio:x:&gid-audio;:
115video:x:&gid-video;:
116utmp:x:&gid-utmp;:
117usb:x:&gid-usb;:
[27f57ec]118cdrom:x:&gid-cdrom;:
119messagebus:x:&gid-messagebus;:</literal>
[65018363]120EOF</userinput></screen>
121
[934e597]122 <variablelist os="d">
[8300133]123
[a709a94]124 <title>Additional groups you may want to add if not already included:</title>
[8300133]125
126 <varlistentry>
[8f1ae86]127 <term><literal>adm:x:&gid-adm;:root,adm,daemon</literal></term>
[8300133]128 <listitem>
[292da92]129 <para>All users in this group are allowed to do administrative tasks</para>
[8300133]130 </listitem>
131 </varlistentry>
132 <varlistentry>
[8f1ae86]133 <term><literal>console:x:&gid-console;:</literal></term>
[8300133]134 <listitem>
[292da92]135 <para>This group has direct access to the console</para>
[8300133]136 </listitem>
137 </varlistentry>
138 <varlistentry>
[8f1ae86]139 <term><literal>cdrw:x:&gid-cdrw;:</literal></term>
[8300133]140 <listitem>
[292da92]141 <para>This group is allowed to use the CDRW drive</para>
[8300133]142 </listitem>
143 </varlistentry>
144 <varlistentry>
[8f1ae86]145 <term><literal>mail:x:&gid-mail;:mail</literal></term>
[8300133]146 <listitem>
147 <para>Used by MTAs (Mail Transport Agents)</para>
148 </listitem>
149 </varlistentry>
150 <varlistentry>
[8f1ae86]151 <term><literal>news:x:&gid-news;:news</literal></term>
[8300133]152 <listitem>
[292da92]153 <para>Used by Network News Servers</para>
[8300133]154 </listitem>
155 </varlistentry>
156 <varlistentry>
[8f1ae86]157 <term><literal>users:x:&gid-users;:</literal></term>
[8300133]158 <listitem>
[b2011e5]159 <para>The default GID used by shadow for new users</para>
[8300133]160 </listitem>
161 </varlistentry>
162 <varlistentry>
[8f1ae86]163 <term><literal>nogroup:x:&gid-nogroup;:</literal></term>
[8300133]164 <listitem>
[292da92]165 <para>This is a default group used by some programs that do not
166 require a group</para>
[8300133]167 </listitem>
168 </varlistentry>
169 <varlistentry>
[ef54ce8]170 <term><literal>nobody:x:&gid-nogroup;:</literal></term>
[8300133]171 <listitem>
[9b020e6]172 <para>This is used by NFS</para>
[8300133]173 </listitem>
174 </varlistentry>
[a90a072]175 </variablelist>
[3f8be484]176
[934e597]177 <para os="e">The created groups are not part of any standard&mdash;they are
[eb39137]178 groups decided on in part by the requirements of the Systemd configuration
[3f8be484]179 in the final system, and in part by common convention employed by a
180 number of existing Linux distributions. The Linux Standard Base (LSB,
181 available at <ulink url="http://www.linuxbase.org"/>) recommends only
182 that, besides the group <quote>root</quote> with a Group ID (GID) of 0,
183 a group <quote>bin</quote> with a GID of 1 be present. All other group
184 names and GIDs can be chosen freely by the system administrator since
185 well-written programs do not depend on GID numbers, but rather use the
186 group's name.</para>
187
188</sect1>
Note: See TracBrowser for help on using the repository browser.