diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-04-12 12:49:29 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-04-12 12:49:29 -0500 |
commit | 99659c30e5369c3f02e286a4a6ec6fecd77f0416 (patch) | |
tree | 12110b15571365acae602ebd9c1348463a0d4710 /chapter8/shadow.sh | |
parent | 0e5288f8f3bee7276d561cde029ed492e2ea85e6 (diff) | |
parent | 13c6afd35cab1e3f4d96857d549e02cfd1e23acd (diff) |
Merge branch 'chapter8'
Diffstat (limited to 'chapter8/shadow.sh')
-rw-r--r-- | chapter8/shadow.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/chapter8/shadow.sh b/chapter8/shadow.sh new file mode 100644 index 0000000..3e2bdd5 --- /dev/null +++ b/chapter8/shadow.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# shellcheck disable=SC2016 +ROOTPW='$1$5RPAAd$oejpw8ErihLIB7vmGE4SV1' + +# shellcheck disable=SC2016 +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 |