dsdb: Allow password history and password changes without an NT hash
authorAndrew Bartlett <abartlet@samba.org>
Mon, 31 Jan 2022 01:08:13 +0000 (14:08 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 26 Jun 2022 22:10:29 +0000 (22:10 +0000)
commitd2a473a7b7471937d1098a11258b875134ad702a
treed73130772308bd5e017792658b7e8e292adfa249
parent6029e2250c4dc837ed4f6b4613f988ae6dff49e3
dsdb: Allow password history and password changes without an NT hash

We now allow this to be via the ENCTYPE_AES256_CTS_HMAC_SHA1_96 hash instead
which allows us to decouple Samba from the unsalted NT hash for
organisations that are willing to take this step (for user accounts).

(History checking is limited to the last three passwords only, as
ntPwdHistory is limited to NT hash values, and the PrimaryKerberosCtr4
package only stores three sets of keys.)

Since we don't store a salt per-key, but only a single salt, the check
will fail for a previous password if the account was renamed prior to a
newer password being set.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
12 files changed:
docs-xml/smbdotconf/security/nt_hash_store.xml [new file with mode: 0644]
docs-xml/smbdotconf/security/ntlmauth.xml
lib/param/loadparm.c
lib/param/loadparm.h
lib/param/param_table.c
selftest/knownfail.d/nt-hash-support-gone
selftest/knownfail.d/password_settings [deleted file]
selftest/target/Samba4.pm
source3/param/loadparm.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/samdb/ldb_modules/wscript_build_server
source4/dsdb/tests/python/password_settings.py