diff options
author | Jan Pazdziora <jpazdziora@redhat.com> | 2022-01-21 21:01:08 +0100 |
---|---|---|
committer | Jan Pazdziora <jpazdziora@redhat.com> | 2022-01-21 21:01:42 +0100 |
commit | 7b12978039208e4c59c294baeee877b4d122d747 (patch) | |
tree | 12be451ea016e61bd94f4151592a60e91a19d7fb /tests/run.sh | |
parent | afc59eba4abb2f05bd935b585b60ee2aa4cf2115 (diff) | |
download | mod_authnz_pam-7b12978039208e4c59c294baeee877b4d122d747.tar.gz mod_authnz_pam-7b12978039208e4c59c294baeee877b4d122d747.tar.xz mod_authnz_pam-7b12978039208e4c59c294baeee877b4d122d747.zip |
Add testing of AuthPAMExpiredRedirect, using pam_unix and sp_max in shadow.
The chmod g+r /etc/shadow approach is obviously only for testing.
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-x | tests/run.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/run.sh b/tests/run.sh index 521652e..ed51b6f 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -49,6 +49,17 @@ next_log | grep 'account .bob. ok' | wc -l | grep '^2$' echo Secret2 > /etc/pam-auth/bob curl -u bob:Secret -s -D /dev/stdout -o /dev/null http://localhost/authn | tee /dev/stderr | grep 401 +curl -u userx:heslox -s http://localhost/authnp3 | tee /dev/stderr | grep 401 +curl -u user1:heslox -s http://localhost/authnp3 | tee /dev/stderr | grep 401 +curl -u user1:heslo1 -s http://localhost/authnp3 | tee /dev/stderr | grep 'User user1' +curl -u user1:heslo1 -s http://localhost/authnp4 | tee /dev/stderr | grep 'User user1' +chage -d $(date -d -2days +%Y-%m-%d) -M 1 user1 +curl -u user1:heslo1 -s http://localhost/authnp3 | tee /dev/stderr | grep 401 +curl -i -u user1:heslo1 -s http://localhost/authnp4 | tee /dev/stderr | grep 'Location: http://localhost/fix-password' +chage -d $(date -d -2days +%Y-%m-%d) -M 3 user1 +curl -u user1:heslo1 -s http://localhost/authnp3 | tee /dev/stderr | grep 'User user1' +curl -u user1:heslo1 -s http://localhost/authnp4 | tee /dev/stderr | grep 'User user1' + if rpm -ql httpd | grep mod_authn_socache ; then echo "Testing AuthBasicProvider socache PAM + AuthnCacheProvideFor PAM" rm /etc/pam-account/bob |