Debian Codegraph @

tests/expiry/05_expiry_-c_no_shadow_file/expiry.test

raw
1 #!/bin/sh
2
3 set -e
4
5 cd $(dirname $0)
6
7 . ../../common/config.sh
8 . ../../common/log.sh
9
10 log_start "$0" "expiry can verify that a password is not expired"
11
12 save_config
13
14 # restore the files on exit
15 trap 'log_status "$0" "FAILURE"; restore_config' 0
16
17 change_config
18
19 echo -n "Remove /etc/shadow..."
20 rm -f /etc/shadow
21 echo "OK"
22
23 ./expiry.exp
24
25 echo -n "Check the passwd file..."
26 ../../common/compare_file.pl config/etc/passwd /etc/passwd
27 echo "OK"
28 echo -n "Check the group file..."
29 ../../common/compare_file.pl config/etc/group /etc/group
30 echo "OK"
31 echo -n "Check that there are no shadow files..."
32 test ! -f /etc/shadow
33 echo "OK"
34 echo -n "Check the gshadow file..."
35 ../../common/compare_file.pl config/etc/gshadow /etc/gshadow
36 echo "OK"
37
38 log_status "$0" "SUCCESS"
39 restore_config
40 trap '' 0
41