summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/kerberos_keytab.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c
index 80d11d434b..4b640151d3 100644
--- a/source3/libads/kerberos_keytab.c
+++ b/source3/libads/kerberos_keytab.c
@@ -530,13 +530,18 @@ int ads_keytab_create_default(ADS_STRUCT *ads)
}
/* now add the userPrincipalName and sAMAccountName entries */
-
+
if ( (sam_account_name = ads_get_samaccountname( ads, ctx, machine_name)) == NULL ) {
DEBUG(0,("ads_keytab_add_entry: unable to determine machine account's name in AD!\n"));
TALLOC_FREE( ctx );
return -1;
}
+ /* upper case the sAMAccountName to make it easier for apps to
+ know what case to use in the keytab file */
+
+ strupper_m( sam_account_name );
+
if ( (ret = ads_keytab_add_entry(ads, sam_account_name )) != 0 ) {
DEBUG(1,("ads_keytab_create_default: ads_keytab_add_entry failed while adding sAMAccountName (%s)\n",
sam_account_name));