summaryrefslogtreecommitdiffstats
path: root/xtests/tst-pam_unix4.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:38:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:38:36 +0000
commit26367bfc399cb3862f94ddca8fce87f98f26d67e (patch)
treeba3a4e02ed5ec62fe645dfa810c01d26decf591f /xtests/tst-pam_unix4.sh
parentInitial commit. (diff)
downloadpam-26367bfc399cb3862f94ddca8fce87f98f26d67e.tar.xz
pam-26367bfc399cb3862f94ddca8fce87f98f26d67e.zip
Adding upstream version 1.3.1.upstream/1.3.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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..e7976fd
--- /dev/null
+++ b/xtests/tst-pam_unix4.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# 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