Initial commit of LFS notes and scripts.
This commit is contained in:
43
lfs-scripts/shadow.sh
Normal file
43
lfs-scripts/shadow.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
# Set the package we're building.
|
||||
package="shadow-4.16.0"
|
||||
extension=".tar.xz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
|
||||
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
|
||||
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
|
||||
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
|
||||
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \
|
||||
-e 's:/var/spool/mail:/var/mail:' \
|
||||
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
|
||||
-i etc/login.defs
|
||||
touch /usr/bin/passwd
|
||||
./configure --sysconfdir=/etc \
|
||||
--disable-static \
|
||||
--with-{b,yes}crypt \
|
||||
--without-libbsd \
|
||||
--with-group-name-max-length=32
|
||||
make
|
||||
make exec_prefix=/usr install
|
||||
make -C man install-man
|
||||
pwconv
|
||||
grpconv
|
||||
mkdir -p /etc/default
|
||||
useradd -D --gid 999
|
||||
passwd root
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
Reference in New Issue
Block a user