From 6d936df97546f8809b42ede32df1d460b06a50a3 Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Mon, 2 Sep 2013 15:13:58 +0000 Subject: Proper tcl quoting for password in expect See [5] Braces - http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M9 --- templates/verify_active_directory.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'templates/verify_active_directory.erb') diff --git a/templates/verify_active_directory.erb b/templates/verify_active_directory.erb index 5a2a506..0917c49 100644 --- a/templates/verify_active_directory.erb +++ b/templates/verify_active_directory.erb @@ -21,7 +21,7 @@ fi # } >&2 #fi -password="<%= scope.lookupvar('samba::server::ads::winbind_pass') -%>" +password='<%= scope.lookupvar('samba::server::ads::winbind_pass') -%>' # short hostname from facter my_hostname="<%= hostname -%>" @@ -62,7 +62,8 @@ get_tgt() { ( $EXPECT -c "spawn -noecho kinit -c $KRB5CCNAME ${winbind_acct}@${default_realm}; expect :; - send ${password}\n; + send {${password}}; + send \n; expect eof" ) &> /dev/null klist -c $KRB5CCNAME &> /dev/null -- cgit v1.2.3