tst-pam_unix4.sh 407 B

1234567891011121314
  1. #!/bin/sh
  2. # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
  3. /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
  4. # this run must successfully change the password
  5. ./tst-pam_unix4 pass
  6. RET=$?
  7. /usr/sbin/usermod -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
  8. /usr/bin/chage -m 10000 tstpamunix
  9. # this run must fail to change the password
  10. ./tst-pam_unix4 fail || RET=$?
  11. /usr/sbin/userdel -r tstpamunix 2> /dev/null
  12. exit $RET