aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/configure_active_directory.erb7
-rw-r--r--templates/verify_active_directory.erb5
2 files changed, 7 insertions, 5 deletions
diff --git a/templates/configure_active_directory.erb b/templates/configure_active_directory.erb
index c860c78..4f9b6e0 100644
--- a/templates/configure_active_directory.erb
+++ b/templates/configure_active_directory.erb
@@ -125,10 +125,11 @@ for attempt in $(seq 1 $max_attempts); do
echo "$attempt of $max_attempts:"
ad_settle
echo "Getting TGT for ${winbind_acct}@${my_realm}" >&2
- $EXPECT -c spawn -noecho kinit -c $KRB5CCNAME '${winbind_acct}@${my_realm};
+ $EXPECT -c "spawn -noecho kinit -c $KRB5CCNAME ${winbind_acct}@${my_realm};
expect :;
- send ${password}\n;
- expect eof'
+ send {${password}};
+ send \n;
+ expect eof"
klist -c $KRB5CCNAME &> /dev/null && break
done
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