From 668f9cd38aac0d8f4009af23eb5c00e41695c263 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Tue, 19 Oct 2010 17:24:27 +0400 Subject: [PATCH] ktpass: also use userPrincipalName for locating the principal --- source4/scripting/bin/ktpass.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/source4/scripting/bin/ktpass.sh b/source4/scripting/bin/ktpass.sh index 7c13fe4..74f740a 100755 --- a/source4/scripting/bin/ktpass.sh +++ b/source4/scripting/bin/ktpass.sh @@ -66,7 +66,8 @@ fi if [ -z $host ]; then host=`hostname` fi -kvno=`${path}ldbsearch -H ldap://$host "(|(samaccountname=$princ)(serviceprincipalname=$princ))" msds-keyversionnumber -k 1 -N 2>/dev/null| grep -i msds-keyversionnumber` + +kvno=`${path}ldbsearch -H ldap://$host "(|(samaccountname=$princ)(serviceprincipalname=$princ)(userprincipalname=$princ))" msds-keyversionnumber -k 1 -N 2>/dev/null| grep -i msds-keyversionnumber` if [ "$kvno" == "" ]; then echo -ne "Unable to find kvno for principal $princ\n" echo -ne " check that you are authentified with kerberos\n" -- 1.5.6.5