Details on this package are located in Section 6.42.4, “Contents of Shadow.”
The following patch fixes an issue in useradd, where it only accepts group names, not group id numbers:
patch -Np1 -i ../shadow-4.0.18.1-useradd_fix-1.patch
The following patch changes the hard-coded /etc in the sources to whatever was passed to configure. It also allows the utilities to run as a user other then root:
patch -Np1 -i ../shadow-4.0.18.1-sysroot_hacks-1.patch
The following value is added to config.cache to make sure that the passwd program is found:
echo "shadow_cv_passwd_dir=${CLFS}/bin" > config.cache
The following value causes Shadow to use its internal lckpwdf instead of the one provided by Glibc. The one provided by Glibc will attempt to modify the host system:
echo "ac_cv_func_lckpwdf=no" >> config.cache
Prepare Shadow for compilation:
./configure --prefix=${CLFS}/cross-tools --sbindir=${CLFS}/cross-tools/bin \
--sysconfdir=$CLFS/etc --disable-shared --without-libpam --without-audit \
--without-selinux --program-prefix=${CLFS_TARGET}- --cache-file=config.cache
Add the proper prefix to the passwd program:
cp config.h{,.orig}
sed "/PASSWD_PROGRAM/s/passwd/${CLFS_TARGET}-&/" config.h.orig > config.h
Compile the package:
make
Install the package:
make install
The tools built on this page will be used later in this book.
Details on this package are located in Section 6.42.4, “Contents of Shadow.”