Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/boot/common/pwdgroup.xml

    r24b004c r688b33d  
    99  <?dbhtml filename="pwdgroup.html"?>
    1010
    11   <title>Creating the passwd and group Files</title>
     11  <title>Creating the passwd, group, and log Files</title>
    1212
    1313  <indexterm zone="ch-boot-pwdgroup">
    1414    <primary sortas="e-/etc/passwd">/etc/passwd</primary>
    15     <secondary>boot</secondary>
    1615  </indexterm>
    1716
    1817  <indexterm zone="ch-boot-pwdgroup">
    1918    <primary sortas="e-/etc/group">/etc/group</primary>
    20     <secondary>boot</secondary>
     19  </indexterm>
     20
     21  <indexterm zone="ch-boot-pwdgroup">
     22    <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
     23  </indexterm>
     24
     25  <indexterm zone="ch-boot-pwdgroup">
     26    <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
     27  </indexterm>
     28
     29  <indexterm zone="ch-boot-pwdgroup">
     30    <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
     31  </indexterm>
     32
     33  <indexterm zone="ch-boot-pwdgroup">
     34    <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
    2135  </indexterm>
    2236
     
    3145<screen><userinput>cat &gt; ${CLFS}/etc/passwd &lt;&lt; "EOF"
    3246<literal>root::&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
    33 <literal>bin:x:&uid-bin;:&gid-bin;:/bin:/bin/false</literal>
    34 <literal>daemon:x:&uid-daemon;:&gid-daemon;:/sbin:/bin/false</literal>
    35 <literal>messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false</literal>
    36 <literal>nobody:x:&uid-nobody;:&gid-nogroup;:Unprivileged User:/dev/null:/bin/false</literal>
    3747EOF</userinput></screen>
    3848
     
    4252
    4353  <variablelist os="c">
    44 
    45     <title>Additional users you may want to add if not already included:</title>
    46 
     54 
     55    <title>Additional users you may want to add:</title>
     56
     57    <varlistentry>
     58      <term><literal>bin:x:&uid-bin;:&gid-bin;:bin:/bin:/bin/false</literal></term>
     59      <listitem>
     60        <para>Can be useful for compatibility with legacy applications.</para>
     61      </listitem>
     62    </varlistentry>
     63    <varlistentry>
     64      <term><literal>daemon:x:&uid-daemon;:&gid-daemon;:daemon:/sbin:/bin/false</literal></term>
     65      <listitem>
     66        <para>It is often recommended to use an unprivileged User ID/Group ID
     67        for daemons to run as, in order to limit their access to the system.</para>
     68      </listitem>
     69    </varlistentry>
    4770    <varlistentry>
    4871      <term><literal>adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false</literal></term>
     
    79102      <listitem>
    80103        <para>Generally used as an account that receives all the information of troubles with the mail server</para>
     104      </listitem>
     105    </varlistentry>
     106    <varlistentry>
     107      <term><literal>nobody:x:&uid-nobody;:&gid-nobody;:nobody:/:/bin/false</literal></term>
     108      <listitem>
     109        <para>Used by NFS</para>
    81110      </listitem>
    82111    </varlistentry>
     
    102131utmp:x:&gid-utmp;:
    103132usb:x:&gid-usb;:
    104 cdrom:x:&gid-cdrom;:
    105 adm:x:&gid-adm;:
    106 messagebus:x:&gid-messagebus;:
    107 systemd-journal:x:&gid-systemd-journal;:
    108 mail:x:&gid-mail;:
    109 wheel:x:&gid-wheel;:
    110 nogroup:x:&gid-nogroup;:</literal>
     133cdrom:x:&gid-cdrom;:</literal>
    111134EOF</userinput></screen>
    112135
    113136  <variablelist os="d">
    114137
    115     <title>Additional groups you may want to add if not already included:</title>
    116 
     138    <title>Additional groups you may want to add</title>
     139
     140    <varlistentry>
     141      <term><literal>adm:x:&gid-adm;:root,adm,daemon</literal></term>
     142      <listitem>
     143        <para>All users in this group are allowed to do administrative tasks</para>
     144      </listitem>
     145    </varlistentry>
    117146    <varlistentry>
    118147      <term><literal>console:x:&gid-console;:</literal></term>
     
    128157    </varlistentry>
    129158    <varlistentry>
     159      <term><literal>mail:x:&gid-mail;:mail</literal></term>
     160      <listitem>
     161        <para>Used by MTAs (Mail Transport Agents)</para>
     162      </listitem>
     163    </varlistentry>
     164    <varlistentry>
    130165      <term><literal>news:x:&gid-news;:news</literal></term>
    131166      <listitem>
     
    140175    </varlistentry>
    141176    <varlistentry>
    142       <term><literal>nobody:x:&gid-nogroup;:</literal></term>
     177      <term><literal>nogroup:x:&gid-nogroup;:</literal></term>
     178      <listitem>
     179        <para>This is a default group used by some programs that do not
     180        require a group</para>
     181      </listitem>
     182    </varlistentry>
     183    <varlistentry>
     184      <term><literal>nobody:x:&gid-nobody;:</literal></term>
    143185      <listitem>
    144186        <para>This is used by NFS</para>
     
    148190
    149191  <para os="e">The created groups are not part of any standard&mdash;they are
    150   groups decided on in part by the requirements of the Systemd configuration
     192  groups decided on in part by the requirements of the Eudev configuration
    151193  in the final system, and in part by common convention employed by a
    152194  number of existing Linux distributions. The Linux Standard Base (LSB,
     
    158200  group's name.</para>
    159201
     202  <para os="f">The <command>login</command>, <command>agetty</command>, and
     203  <command>init</command> programs (and others) use a number of log
     204  files to record information such as who was logged into the system and
     205  when. However, these programs will not write to the log files if they
     206  do not already exist. Initialize the log files and give them
     207  proper permissions:</para>
     208
     209<screen><userinput>touch ${CLFS}/var/run/utmp ${CLFS}/var/log/{btmp,lastlog,wtmp}
     210chmod -v 664 ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog
     211chmod -v 600 ${CLFS}/var/log/btmp</userinput></screen>
     212
     213  <para>The <filename>/var/run/utmp</filename> file records the users
     214  that are currently logged in. The <filename>/var/log/wtmp</filename>
     215  file records all logins and logouts. The
     216  <filename>/var/log/lastlog</filename> file records when
     217  each user last logged in. The <filename>/var/log/btmp</filename> file
     218  records the bad login attempts.</para>
     219
    160220</sect1>
Note: See TracChangeset for help on using the changeset viewer.