[Samba] copy the password hash from one user to another user

Marcos Ariel Negrini mnegrini at afip.gob.ar
Fri Aug 5 13:49:08 UTC 2022


Hello everyone:
for the integration of a system with samba4AD I need that when creating 
a user takes by default the password of another (for example that when 
creating the user B, is generated with the password of A). I was looking 
how to obtain the hash value of the password of A(ldbsearch -H 
/path/sam.ldb '(cn=A)' unicodepwd), but I did not find how to assign 
this hash to B. Is it possible to do this? I was trying to do all this 
with python, I managed without difficulty to change the password of B 
from a string, but not from the corresponding hash.
greetings



More information about the samba mailing list