10.69. Shadow-4.0.16 N32 Libraries

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

10.69.1. Installation of Shadow

[Note]

Note

If you would like to enforce the use of strong passwords, refer to http://www.linuxfromscratch.org/blfs/view/svn/postlfs/cracklib.html for installing Cracklib prior to building Shadow. Then add --with-libcrack to the configure command below.

You will also need to use the follow sed after the configuration command to make sure the correct library is linked.

sed -i libtool \
         -e 's@\(^sys_lib_search_path_spec=\).*@\1"/lib32 /usr/lib32 /usr/local/lib32"@g' \
         -e 's@\(^sys_lib_dlsearch_path_spec=\).*@\1"/lib32 /usr/lib32 /usr/local/lib32"@g'

Prepare Shadow for compilation:

CC="gcc ${BUILDN32}" ./configure --libdir=/lib32 --sysconfdir=/etc \
   --enable-shared --without-libpam --without-audit --without-selinux

The meaning of the configure options:

--without-libpam

Support for Linux-PAM is enabled by default in Shadow, however PAM is not installed on a base CLFS system, so this switch disables PAM support in Shadow. For instructions to install PAM and link Shadow to it, you can look at http://www.linuxfromscratch.org/blfs/view/svn/postlfs/shadow.html.

--without-audit

Support for auditing is enabled by default, but a library that it needs is not installed in a base CLFS system. This switch disables auditing support.

--without-selinux

Support for selinux is enabled by default, but selinux is not built in a base CLFS system and configure will fail without this switch.

Disable the installation of the groups program and its man pages, as Coreutils provides a better version:

sed -i 's/groups$(EXEEXT) //' src/Makefile
sed -i '/groups/d' man/Makefile

Compile the package:

make

This package does not come with a test suite.

Install the package:

make install

Move a misplaced program to its proper location:

mv -v /usr/bin/passwd /bin

Move Shadow's dynamic libraries to a more appropriate location:

mv -v /lib32/libshadow.*a /usr/lib32
rm -v /lib32/libshadow.so
ln -svf ../../lib32/libshadow.so.0 /usr/lib32/libshadow.so

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