I tried my function in another test system and  I get a correct value.

Here, I get the followinng value :

    SambaPwdLastSet: 1.585739918586E12

but finally I found a solution changing my function to  :

    var seconds = java.time.Instant.now().getEpochSecond();


Le 01.04.2020 à 13:03, Arnaud Gymnase a écrit :

Hello all,

I thouhg I found the solution calculating a SambaPwdLastSet value but as I'm really not an expert en Java, I failed ....

I had the follwing in my dataset

/<dataset>//
//          <name>SambaPwdLastSet</name>//
//          <policy>FORCE</policy>//
//          <defaultValues>//
//          </defaultValues>//
//          <forceValues>//
//<string>js:TimeInSecond()</string>//
//          </forceValues>//
//          <createValues>//
//          </createValues>//
//      </dataset>
/

And my function TimeInSecond() is the following : /
/

    /function TimeInSecond() {//
    // var date= new Date();//
    // var timestamp = Math.floor(date/1000);//
    //return timestamp//
    // }/

My function is called, this is is fine, but the result seems to be always 0 :

*    [LDAP: error code 21 - SambaPwdLastSet: value #0 invalid per syntax*

So I think my function has a problem ... but



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

lsc-users mailing list
[email protected]
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

Reply via email to