-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshadow.sh
More file actions
executable file
·39 lines (32 loc) · 961 Bytes
/
shadow.sh
File metadata and controls
executable file
·39 lines (32 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# See LICENSE for license details.
#!/bin/bash
set -euo pipefail
unpack_src() {
tar xf shadow-4.8.1.tar.xz && \
cd shadow-4.8.1
return
}
configure() {
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 $TODD_FAKE_ROOT_DIR/usr/bin/passwd
./configure --sysconfdir=/etc \
--with-group-name-max-length=32
return
}
make_install() {
mkdir -p $TODD_FAKE_ROOT_DIR/{lib,usr/lib}
make
make DESTDIR=$TODD_FAKE_ROOT_DIR install
# TODO: interactive mode
# pwconv
# grpconv
# passwd root
}
unpack_src && configure && make_install