[Samba] Samba4 as AD, what password hash is used?

Rowland Penny rowlandpenny at googlemail.com
Wed Jun 17 07:53:56 MDT 2015


On 17/06/15 14:39, mathias dufresne wrote:
> Hi all,
>
> I was wondering what kind of password encryption is used into LDB file to
> store user's password.
>
> Our users are authenticating against some OpenLDAP tree to access their
> applications. We would like to add some field on this OpenLDAP to generate
> Samba4 valid password when users are connecting against it, to be able then
> to copy this field into our Samba4 users for they have same password for
> applications and AD.
>
> Kindly regards,
>
> mathias

it is in unicode, to create a windows password with bash, you need to do 
something like this:

echo -n "\"PASSWORD\"" | iconv -f UTF-8 -t UTF-16LE | base64 -w 0

The password is supposed to be read only, you cannot read it over the 
wire and must be set via SSL.

Have you considered kerberos instead, i.e. SSO

Rowland



More information about the samba mailing list