From 24477cacc9b12cef01ee06cf6ce4db9bb87b5fae 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 Autobuild-User: Matthieu Patou Autobuild-Date: Fri Nov 12 20:24:23 UTC 2010 on sn-devel-104 --- source4/scripting/bin/ktpass.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source4/scripting/bin/ktpass.sh b/source4/scripting/bin/ktpass.sh index 7c13fe4ac0e..74f740a8bb4 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" -- 2.34.1