Import Linux-PAM.
[profile/ivi/pam.git] / xtests / tst-pam_unix4.sh
1 #!/bin/bash
2
3 # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
4 /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
5 # this run must successfully change the password
6 ./tst-pam_unix4 pass
7 RET=$?
8 /usr/sbin/usermod -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
9 /usr/bin/chage -m 10000 tstpamunix
10 # this run must fail to change the password
11 ./tst-pam_unix4 fail || RET=$?
12
13 /usr/sbin/userdel -r tstpamunix 2> /dev/null
14 exit $RET