summaryrefslogtreecommitdiff
path: root/xtests/tst-pam_unix4.sh
blob: 787c2f90f0eeaf30008482014c2155016b9b9f11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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