summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-10-19 17:24:27 +0400
committerMatthieu Patou <mat@samba.org>2010-11-12 20:24:23 +0000
commit24477cacc9b12cef01ee06cf6ce4db9bb87b5fae (patch)
treef958a595e639611ea1b52fc001308a8792180a87 /source4/scripting
parentf4e9f125e0e4a9ab236595b79315ad26b7ca9d8b (diff)
downloadsamba-24477cacc9b12cef01ee06cf6ce4db9bb87b5fae.tar.gz
samba-24477cacc9b12cef01ee06cf6ce4db9bb87b5fae.tar.bz2
samba-24477cacc9b12cef01ee06cf6ce4db9bb87b5fae.zip
ktpass: also use userPrincipalName for locating the principal
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Fri Nov 12 20:24:23 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/ktpass.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/scripting/bin/ktpass.sh b/source4/scripting/bin/ktpass.sh
index 7c13fe4ac0..74f740a8bb 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"