in reply to Looking for highest uidNumber in ldap
Hi,
This has been spoken about before on the OpenLDAP lists, and the following is the method adopted by most of the commercial support companies, including my own (But your circumstance may defer).
The best way to handle this, is to handle it in OpenLDAP directly.
See:
Basically, you create an entry like so:
dn: cn=maxUid,dc=example,dc=com objectClass: extensibleObject objectClass: top uidNumber: 500
And then do the following ldapmodify with every new entry added:
dn: cn=maxUid,dc=example,dc=com changetype: modify delete: uidNumber uidNumber: 500 - add: uidNumber uidNumber: 501
Then you can just do a search to see the latest number.
HTH,
Gavin.
|
|---|