Ticket #3516: createfiles.patch

File createfiles.patch, 2.2 KB (added by Chris Staub, 10 years ago)
  • branches/systemd/BOOK/chapter06/createfiles.xml

     
    1818    <primary sortas="e-/etc/group">/etc/group</primary>
    1919  </indexterm>
    2020
    21   <indexterm zone="ch-system-createfiles">
    22     <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
    23   </indexterm>
    24 
    25   <indexterm zone="ch-system-createfiles">
    26     <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
    27   </indexterm>
    28 
    29   <indexterm zone="ch-system-createfiles">
    30     <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
    31   </indexterm>
    32 
    33   <indexterm zone="ch-system-createfiles">
    34     <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
    35   </indexterm>
    36 
    3721  <para>Some programs use hard-wired paths to programs which do not exist yet. In
    3822  order to satisfy these programs, create a number of symbolic links which will be
    3923  replaced by real files throughout the course of this chapter after the software
     
    127111  installed, the <parameter>+h</parameter> directive will be used for the duration
    128112  of this chapter.</para>
    129113
    130   <para>The <command>login</command>, <command>agetty</command>, and
    131   <command>init</command> programs (and others) use a number of log
    132   files to record information such as who was logged into the system and
    133   when. However, these programs will not write to the log files if they
    134   do not already exist. Initialize the log files and give them
    135   proper permissions:</para>
    136 
    137 <screen><userinput>touch /var/log/{btmp,lastlog,wtmp}
    138 chgrp -v utmp /var/log/lastlog
    139 chmod -v 664  /var/log/lastlog
    140 chmod -v 600  /var/log/btmp</userinput></screen>
    141 
    142   <para>The <filename>/var/log/wtmp</filename> file records all logins and
    143   logouts. The <filename>/var/log/lastlog</filename> file records when each
    144   user last logged in. The <filename>/var/log/btmp</filename> file records the
    145   bad login attempts.</para>
    146 
    147   <note><para>The <filename>/run/utmp</filename> file records the users that
    148   are currently logged in.  This file is created dynamically in the boot
    149   scripts.</para></note>
    150 
    151114</sect1>