diff options
Diffstat (limited to 'chapter06/chapter06.xml')
-rw-r--r-- | chapter06/chapter06.xml | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 0ea46cf1b..cf5715585 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -222,7 +222,7 @@ ln -s bash /bin/sh</userinput></screen> <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"?> <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 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> |