Since the length of the krbtgt password after conversion to UTF-8 form is
typically greater than the maximum accepted by crypt(), the call usually
fails. This commit disables generation of crypt() passwords for this specific
account, as it's not necessary.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14621
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
+++ /dev/null
-^samba.tests.samba_tool.provision_userPassword_crypt
num_packages++;
}
- if (io->ac->userPassword_schemes) {
+ /*
+ * Don't generate crypt() or similar password for the krbtgt account.
+ * It's unnecessary, and the length of the cleartext in UTF-8 form
+ * exceeds the maximum (CRYPT_MAX_PASSPHRASE_SIZE) allowed by crypt().
+ */
+ if (io->ac->userPassword_schemes && !io->u.is_krbtgt) {
/*
* setup 'Primary:userPassword' element
*/