Le 20/01/2016 08:18, BÖSCH Christian a écrit :
Hi,

I want to set passwords, therefore I use this dataset:

        <dataset>
<name>userPassword</name>
<policy>FORCE</policy>
          <forceValues>
<string><![CDATA[
                var upass = "";
var clear = srcBean.getDatasetFirstValueById(“clearTextPwd"); upass = SecurityUtils.hash(SecurityUtils.HASH_SHA1, clear);
                upass;
]]></string>
          </forceValues>
        </dataset>

After running I get ‘invalid credentials’ from the ldap server.
What’s wrong with that?


Hello Christian,

you need to concat '{SHA}' in front of the hash before returning the value from the dataset :

    upass = '{SHA}' + SecurityUtils.hash(SecurityUtils.HASH_SHA1, clear);

--
Clément OUDOT
Consultant en logiciels libres, Expert infrastructure et sécurité
Savoir-faire Linux

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to