d176f8c487
make password plugin work.
24 lines
1.2 KiB
Text
24 lines
1.2 KiB
Text
$NetBSD: patch-plugins_password_helpers_passwd-expect,v 1.1 2016/05/26 03:23:38 taca Exp $
|
|
|
|
Make password plugin work on NetBSD (and maybe other *BSD).
|
|
|
|
--- plugins/password/helpers/passwd-expect.orig 2016-04-17 16:22:20.000000000 +0000
|
|
+++ plugins/password/helpers/passwd-expect
|
|
@@ -49,7 +49,7 @@ set oldpassword_string "((O|o)ld|login|\
|
|
set newpassword_string "(N|n)ew.* (P|p)assword.*"
|
|
set badoldpassword_string "(Authentication token manipulation error).*"
|
|
set badpassword_string "((passwd|BAD PASSWORD).*|(passwd|Bad:).*\r)"
|
|
-set verify_string "((R|r)e-*enter.*(P|p)assword|Retype new( UNIX)? password|(V|v)erification|(V|v)erify|(A|a)gain).*"
|
|
+set verify_string "((R|r)e-*enter.*(P|p)assword|Retype (N|n)ew( UNIX)? (P|p)assword|(V|v)erification|(V|v)erify|(A|a)gain).*"
|
|
set success_string "((P|p)assword.* changed|successfully)"
|
|
set login_string "(((L|l)ogin|(U|u)sername).*)"
|
|
set timeout 20
|
|
@@ -251,6 +251,8 @@ expect {
|
|
expect {
|
|
-re $success_string {sleep .5
|
|
send exit\r}
|
|
+ -re $prompt_string { sleep .5
|
|
+ send exit\r}
|
|
-re $badpassword_string {puts $err "$expect_out(0,string)"
|
|
close $err
|
|
exit 1}
|