aboutsummaryrefslogtreecommitdiffstats
path: root/chapter8/shadow.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chapter8/shadow.sh')
-rw-r--r--chapter8/shadow.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/chapter8/shadow.sh b/chapter8/shadow.sh
index 7a693aa..f0254de 100644
--- a/chapter8/shadow.sh
+++ b/chapter8/shadow.sh
@@ -1,3 +1,26 @@
#!/bin/bash
+ROOTPW='$1$5RPAAd$oejpw8ErihLIB7vmGE4SV1'
+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 SHA512:' \
+ -e 's:/var/spool/mail:/var/mail:' \
+ -i etc/login.defs
+
+sed -i 's/1000/999/' etc/useradd
+
+touch /usr/bin/passwd
+./configure --sysconfdir=/etc \
+ --with-group-name-max-length=32
+
+make
+make -j1 install
+
+pwconv
+grpconv
+
+usermod -p "${ROOTPW}" root