summaryrefslogtreecommitdiff
path: root/xtests/tst-pam_unix4.sh
diff options
context:
space:
mode:
authorLorry <lorry@roadtrain.codethink.co.uk>2012-07-23 11:07:21 +0100
committerLorry <lorry@roadtrain.codethink.co.uk>2012-07-23 11:07:21 +0100
commit7e99712021a572e6ca85ff8454d3b322bfbeaa6e (patch)
tree6577e57ca2aab59b4b6ed8f21dfdbe349c028e49 /xtests/tst-pam_unix4.sh
downloadlinux-pam-7e99712021a572e6ca85ff8454d3b322bfbeaa6e.tar.gz
Tarball conversion
Diffstat (limited to 'xtests/tst-pam_unix4.sh')
-rwxr-xr-xxtests/tst-pam_unix4.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh
new file mode 100755
index 0000000..787c2f9
--- /dev/null
+++ b/xtests/tst-pam_unix4.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
+/usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
+# this run must successfully change the password
+./tst-pam_unix4 pass
+RET=$?
+/usr/sbin/usermod -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
+/usr/bin/chage -m 10000 tstpamunix
+# this run must fail to change the password
+./tst-pam_unix4 fail || RET=$?
+
+/usr/sbin/userdel -r tstpamunix 2> /dev/null
+exit $RET