Blame tests/p_passwd/_user_password.expect
|
Pablo Greco |
c9ea90 |
#!/usr/bin/expect -d
|
|
Iain Douglas |
756e5d |
# Author: Iain Douglas <centos@1n6.org.uk>
|
|
Iain Douglas |
756e5d |
|
|
Iain Douglas |
756e5d |
set timeout 10
|
|
Iain Douglas |
756e5d |
match_max 6000
|
|
Iain Douglas |
756e5d |
spawn su passtest -c passwd
|
|
Pablo Greco |
c9ea90 |
expect -re "(UNIX|Current) password:" { send -- "passtest\r" }
|
|
Iain Douglas |
756e5d |
expect {
|
|
Iain Douglas |
756e5d |
"You must wait longer to change your password"
|
|
Iain Douglas |
756e5d |
{
|
|
Iain Douglas |
756e5d |
exit 2
|
|
Iain Douglas |
756e5d |
}
|
|
Iain Douglas |
756e5d |
"Authentication token manipulation error"
|
|
Iain Douglas |
756e5d |
{
|
|
Iain Douglas |
756e5d |
exit 3
|
|
Iain Douglas |
756e5d |
}
|
|
Iain Douglas |
756e5d |
"password:"
|
|
Iain Douglas |
756e5d |
{
|
|
Iain Douglas |
756e5d |
send -- "ano24ther\r"
|
|
Iain Douglas |
756e5d |
expect "*?password:*"
|
|
Iain Douglas |
756e5d |
send -- "ano24ther\r"
|
|
Iain Douglas |
756e5d |
expect eof
|
|
Iain Douglas |
756e5d |
}
|
|
Iain Douglas |
756e5d |
}
|