Yes, the uidNumber CAN be random, note however that this number (together with the gidNumber) traditionally comes from UNIX’ uid and gid, which can have further meanings. For instance, in GNU/Linux regular user accounts have uid’s starting at 1000 and every user with a uid < 1000 is a system user. So you might want to take care that you do not assign numbers <1000 to regular users.
AFAICT, only Javascript (and Groovy: http://lsc-project.org/wiki/documentation/2.1/scripting/start) is supported. However, it is quite easy to achieve what you want using JS: <dataset> <name>uidNumber</name> <policy>KEEP</policy> <createValues> <string>js: Math.floor((Math.random() * 9999999) + 1000)</string> </createValues> </dataset> This will generate a new uidNumber on user creation as a random number between 1000 and 9999999 (inclusive). I do not know your usecase and have no idea how big uidNumber can be, so you might want to change the numbers. Also, I just started with LSC myself, so I might be fuzzy with the correct lsc-syntax. The javascript should be correct though. Best, Alex. Von: [email protected] [mailto:[email protected]] Im Auftrag von Bart Coninckx Gesendet: Dienstag, 3. Januar 2017 22:11 An: [email protected] Betreff: [lsc-users] generate a random value for uidNumber Hi all, I am syncing from LDAP to eDirectory with lsc-2.1.3. In the target directory I need to add a objectclass which requires the uidNumber property. It is my assumption that this value should be unique per directory entry. Ideally a random value should be produced in between, let's say, 10000 and 20000. I'm not sure how to go about this. From what I read one solution would be to use scripting and have Javascript take care of this. I'm not very proficient at Javascript, are other scripting languages or bash supported? Cheers, Met Vriendelijke Groet, Kind Regards, Salutations, Bart Coninckx
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

