[lfs-support] 6.06 Creating Essential Files and Symlinks

Andrew Benton b3nton at gmail.com
Wed Feb 15 02:36:21 PST 2012


On Tue, 14 Feb 2012 18:05:09 -0800
Qrux <qrux.qed at gmail.com> wrote:

> Also, did you install shadow from LFS?
> 
> Because I see this in my /etc/login.defs:
> 
> 	xlapp [/var/log] # grep tmp /etc/login.defs 
> 	# If defined, login failures will be logged here in a utmp format.
> 	# last, when invoked as lastb, will read /var/log/btmp, so...
> 	FTMP_FILE	/var/log/btmp
> 
> And I see this in in shadow:
> 
> 	xlapp [~/lfs/src/shadow-4.1.4.3/etc] # grep tmp login.defs
> 	# If defined, login failures will be logged here in a utmp format.
> 	# last, when invoked as lastb, will read /var/log/btmp, so...
> 	FTMP_FILE	/var/log/btmp
> 
> I assume (perhaps tacitly) that this is being installed on your system, too, if you're installing shadow.  Again, IDK if it's login that's writing to this file.  But something is.  Your data differs from mine, but I don't think that qualifies my data as being "wrong".  LOL

The difference is I install PAM before I install shadow. If you look at
the shadow page in BLFS it has:
install -v -m644 /etc/login.defs /etc/login.defs.orig &&
for FUNCTION in LASTLOG_ENAB MAIL_CHECK_ENAB \
                PORTTIME_CHECKS_ENAB CONSOLE \
                MOTD_FILE NOLOGINS_FILE PASS_MIN_LEN \
                SU_WHEEL_ONLY MD5_CRYPT_ENAB \
                CONSOLE_GROUPS ENVIRON_FILE \
                ULIMIT ENV_TZ ENV_HZ ENV_SUPATH \
                ENV_PATH QMAIL_DIR MAIL_DIR MAIL_FILE \
                CHFN_AUTH FAILLOG_ENAB QUOTAS_ENAB FTMP_FILE \
                OBSCURE_CHECKS_ENAB CRACKLIB_DICTPATH \
                PASS_CHANGE_TRIES PASS_ALWAYS_WARN ISSUE_FILE
do
    sed -i "s/^$FUNCTION/# &/" /etc/login.defs
done

So shadow doesn't write to /var/log/btmp if it's installed after PAM.
Thanks for your help looking at this. I'd forgotten about modifying
/etc/login.defs when installing shadow after PAM.

Andy



More information about the lfs-support mailing list