Moved log file creation from Shadow to "Creating the passwd

and group files" and renamed that section accordingly.
Closes 741.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3166 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Greg Schafer 2004-01-14 01:34:43 +00:00
parent aba5bfb32f
commit b6f8614176
3 changed files with 20 additions and 19 deletions

View File

@ -50,6 +50,10 @@
</itemizedlist> </itemizedlist>
</listitem> </listitem>
<listitem><para>January 13th, 2004 [greg]: Moved log file creation from Shadow
to "Creating the passwd and group files" and renamed that section accordingly.
Closes 741.</para></listitem>
<listitem><para>January 13th, 2004 [greg]: Upgraded to Automake-1.8.2, Kbd-1.11 <listitem><para>January 13th, 2004 [greg]: Upgraded to Automake-1.8.2, Kbd-1.11
and Sed-4.0.9.</para></listitem> and Sed-4.0.9.</para></listitem>

View File

@ -222,7 +222,7 @@ ln -s bash /bin/sh</userinput></screen>
<sect1 id="ch06-pwdgroup"> <sect1 id="ch06-pwdgroup">
<title>Creating the passwd and group files</title> <title>Creating the passwd, group and log files</title>
<?dbhtml filename="pwdgroup.html" dir="chapter06"?> <?dbhtml filename="pwdgroup.html" dir="chapter06"?>
<para>In order for <emphasis>root</emphasis> to be able to login and for the <para>In order for <emphasis>root</emphasis> to be able to login and for the
@ -279,6 +279,21 @@ has executed. Since we want to use our newly compiled binaries as soon as
they are installed, we turn off this function for the duration of this they are installed, we turn off this function for the duration of this
chapter.</para> chapter.</para>
<para>The <userinput>login</userinput>, <userinput>agetty</userinput> and
<userinput>init</userinput> programs (and some others) use a number of log
files to record information such as who was logged into the system and when.
These programs, however, won't write to the log files if they don't already
exist. Initialize the log files and give them their proper permissions:</para>
<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen>
<para>The <filename>/var/run/utmp</filename> file records the users that are
currently logged in. The <filename>/var/log/wtmp</filename> file records all
logins and logouts. The <filename>/var/log/lastlog</filename> file records for
each user when he or she last logged in. The <filename>/var/log/btmp</filename>
file records the bad login attempts.</para>
</sect1> </sect1>

View File

@ -16,24 +16,6 @@ Estimated required disk space: &shadow-compsize;</screen>
<sect2> <sect2>
<title>Installation of Shadow</title> <title>Installation of Shadow</title>
<para>The <userinput>login</userinput>, <userinput>getty</userinput> and
<userinput>init</userinput> programs (and some others) maintain a number
of logfiles to record who are and who were logged in to the system. These
programs, however, don't create these logfiles when they don't exist, so if
you want this logging to occur you will have to create the files yourself.
The Shadow package needs to detect these files in their proper place, so we
create them now, with their proper permissions:</para>
<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen>
<para>The <filename>/var/run/utmp</filename> file lists the users that are
currently logged in, the <filename>/var/log/wtmp</filename> file who
<emphasis>were</emphasis> logged in and when.
The <filename>/var/log/lastlog</filename> file shows for each user when he
or she last logged in, and the <filename>/var/log/btmp</filename> lists the
bad login attempts.</para>
<para>Shadow hard-wires the path to the <userinput>passwd</userinput> binary <para>Shadow hard-wires the path to the <userinput>passwd</userinput> binary
within the binary itself, but does this the wrong way. If a within the binary itself, but does this the wrong way. If a
<userinput>passwd</userinput> binary is not present before installing Shadow, <userinput>passwd</userinput> binary is not present before installing Shadow,