shadow/tests/chage/39_chage_interactive-d-1/run.exp
2017-10-22 20:24:32 +00:00

32 lines
604 B
Plaintext
Executable File

#!/usr/bin/expect
set timeout 5
# I've not been able to put the opening bracket in the regular expressions
# If anyone knows...
spawn /usr/bin/chage myuser1
expect -re "Minimum Password Age .0\]: "
send "\r"
expect -re "Maximum Password Age .99999\]: "
send "\r"
expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .-1\]: "
send -- "-1\r"
expect -re "Password Expiration Warning .7\]: "
send "\r"
expect -re "Password Inactive .3\]: "
send "\r"
expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: "
send "\r"
expect {
eof {
} default {
puts "\nFAIL"
exit 1
}
}
puts "\nPASS"
exit 0