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 {
|
|
Brian Stinson |
7440c3 |
"You must wait longer to change your password"
|
|
Brian Stinson |
7440c3 |
{
|
|
Brian Stinson |
7440c3 |
exit 2
|
|
Brian Stinson |
7440c3 |
}
|
|
Brian Stinson |
7440c3 |
"Authentication token manipulation error"
|
|
Brian Stinson |
7440c3 |
{
|
|
Brian Stinson |
7440c3 |
exit 3
|
|
Brian Stinson |
7440c3 |
}
|
|
Brian Stinson |
7440c3 |
"Current Password:" {
|
|
Brian Stinson |
7440c3 |
send -- "passtest\r"
|
|
Brian Stinson |
7440c3 |
expect {
|
|
Brian Stinson |
7440c3 |
"Authentication token manipulation error"
|
|
Brian Stinson |
7440c3 |
{
|
|
Brian Stinson |
7440c3 |
exit 3
|
|
Brian Stinson |
7440c3 |
}
|
|
Brian Stinson |
7440c3 |
}
|
|
Brian Stinson |
7440c3 |
}
|
|
Brian Stinson |
7440c3 |
"password:"
|
|
Brian Stinson |
7440c3 |
{
|
|
Brian Stinson |
7440c3 |
send -- "ano24ther\r"
|
|
Brian Stinson |
7440c3 |
expect "*?\[pP]assword:*"
|
|
Brian Stinson |
7440c3 |
send -- "ano24ther\r"
|
|
Brian Stinson |
7440c3 |
expect eof
|
|
Brian Stinson |
7440c3 |
}
|
|
Brian Stinson |
7440c3 |
}
|
|
Brian Stinson |
7440c3 |
|