Ticket #3516: createfiles.patch
File createfiles.patch, 2.2 KB (added by , 11 years ago) |
---|
-
branches/systemd/BOOK/chapter06/createfiles.xml
18 18 <primary sortas="e-/etc/group">/etc/group</primary> 19 19 </indexterm> 20 20 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 37 21 <para>Some programs use hard-wired paths to programs which do not exist yet. In 38 22 order to satisfy these programs, create a number of symbolic links which will be 39 23 replaced by real files throughout the course of this chapter after the software … … 127 111 installed, the <parameter>+h</parameter> directive will be used for the duration 128 112 of this chapter.</para> 129 113 130 <para>The <command>login</command>, <command>agetty</command>, and131 <command>init</command> programs (and others) use a number of log132 files to record information such as who was logged into the system and133 when. However, these programs will not write to the log files if they134 do not already exist. Initialize the log files and give them135 proper permissions:</para>136 137 <screen><userinput>touch /var/log/{btmp,lastlog,wtmp}138 chgrp -v utmp /var/log/lastlog139 chmod -v 664 /var/log/lastlog140 chmod -v 600 /var/log/btmp</userinput></screen>141 142 <para>The <filename>/var/log/wtmp</filename> file records all logins and143 logouts. The <filename>/var/log/lastlog</filename> file records when each144 user last logged in. The <filename>/var/log/btmp</filename> file records the145 bad login attempts.</para>146 147 <note><para>The <filename>/run/utmp</filename> file records the users that148 are currently logged in. This file is created dynamically in the boot149 scripts.</para></note>150 151 114 </sect1>