7.6. Shadow-4.1.5.1

The Shadow package contains programs for handling passwords in a secure way.

7.6.1. Installation of Shadow

Disable the installation of the groups and nologin programs, as better versions of these programs are provided by Coreutils and Util-linux:

cp -v src/Makefile.in{,.orig}
sed -e 's/groups$(EXEEXT) //' -e 's/= nologin$(EXEEXT)/= /' \
    src/Makefile.in.orig > src/Makefile.in

Prepare Shadow for compilation:

./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET}

Tell Shadow to use passwd in /tools/bin:

cp -v config.h{,.orig}
sed '/PASSWD_PROGRAM/s@/bin/passwd@/tools&@' config.h.orig > config.h

Prevent Shadow from setting installed programs suid:

cp -v src/Makefile{,.orig}
sed 's/\(^suidu*bins = \).*/\1/' src/Makefile.orig > src/Makefile

Compile the package:

make

Install the package:

make install

Details on this package are located in Section 10.25.4, “Contents of Shadow.”