diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:22:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:22:06 +0000 |
commit | 741c1ef7a4f2ac316ad6e557ddbe03023413478d (patch) | |
tree | 38890f681daa26c57e865b4feca10d0ca53e1046 /tests/log/faillog/20_faillog-r-u/login.exp | |
parent | Initial commit. (diff) | |
download | shadow-upstream.tar.xz shadow-upstream.zip |
Adding upstream version 1:4.5.upstream/1%4.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/log/faillog/20_faillog-r-u/login.exp')
-rwxr-xr-x | tests/log/faillog/20_faillog-r-u/login.exp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/log/faillog/20_faillog-r-u/login.exp b/tests/log/faillog/20_faillog-r-u/login.exp new file mode 100755 index 0000000..5df0903 --- /dev/null +++ b/tests/log/faillog/20_faillog-r-u/login.exp @@ -0,0 +1,26 @@ +#!/usr/bin/expect + +if {$argc == 1} { + set user [lindex $argv 0] +} else { + set user "foo" +} + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +set timeout 5 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/bash +expect "# " + +send "login $user\r" +expect "Password: " +sleep 0.1 +send "badpass\r" +send_user "\n# password 'badpass' sent\n\n" +expect "login: " + +send "exit\r" +exit 0 |