samba-tool add support for userPassword
authorGary Lockyer <gary@catalyst.net.nz>
Mon, 15 May 2017 00:19:22 +0000 (12:19 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 25 May 2017 00:25:12 +0000 (02:25 +0200)
commitb14bb68417e34db17a9b7ba4feac7b32ef2cd39e
tree9c950d5602efabe05f82db00fdaee6446d114636
parent8a5308bea054686a25aba5b933bc02ad1f2e4587
samba-tool add support for userPassword

Changes to virtualCryptSHA256 and virtualCryptSHA512 attributes.
The values are now calculated as follows:
  1) If a value exists in 'Primary:userPassword' with
     the specified number of rounds it is returned.
  2) If 'Primary:CLEARTEXT, or 'Primary:SambaGPG' with
     '--decrypt-samba-gpg'. Calculate a hash with the specified number of rounds
  3) Return the first {CRYPT} value in 'Primary:userPassword' with a
     matching algorithm

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/user.py
selftest/knownfail