From b6f86141768a23c5fbe288ea076d9df8878c23dc Mon Sep 17 00:00:00 2001 From: Greg Schafer Date: Wed, 14 Jan 2004 01:34:43 +0000 Subject: 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 --- chapter06/chapter06.xml | 17 ++++++++++++++++- chapter06/shadowpwd.xml | 18 ------------------ 2 files changed, 16 insertions(+), 19 deletions(-) (limited to 'chapter06') 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 -Creating the passwd and group files +Creating the passwd, group and log files In order for root 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. +The login, agetty and +init 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: + +touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} +chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp} + +The /var/run/utmp file records the users that are +currently logged in. The /var/log/wtmp file records all +logins and logouts. The /var/log/lastlog file records for +each user when he or she last logged in. The /var/log/btmp +file records the bad login attempts. + diff --git a/chapter06/shadowpwd.xml b/chapter06/shadowpwd.xml index 4e8e3aa79..89cfd5d39 100644 --- a/chapter06/shadowpwd.xml +++ b/chapter06/shadowpwd.xml @@ -16,24 +16,6 @@ Estimated required disk space: &shadow-compsize; Installation of Shadow -The login, getty and -init 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: - -touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} -chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp} - -The /var/run/utmp file lists the users that are -currently logged in, the /var/log/wtmp file who -were logged in and when. -The /var/log/lastlog file shows for each user when he -or she last logged in, and the /var/log/btmp lists the -bad login attempts. - Shadow hard-wires the path to the passwd binary within the binary itself, but does this the wrong way. If a passwd binary is not present before installing Shadow, -- cgit v1.2.3-54-g00ecf