[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Get Max uidNumber ...

"C.Lee Taylor" wrote:
> Greetings ...
>         I search the archives and found that there was a few ideas how to do
> this, so I thought that I would though out my idea and see you guys bash
> it ... no pun intended ... I know this would be slow if one was tring to
> bring in more than a few users, but then I use it just to add a few
> users at a time ... I also believe this would not be a good idea to have
> more than one user adding in users, because the uidNumber could go up
> while we import the next user.

I added an maxAccount objectClass wit "MUST uidNumber..." and update it
by one...
but test before call to the ldap_add if the uid was "stolen" by other
concurrent process... if the uid is in use perform a new maxAccount read

Ignacio Coupeau, Ph.D.     e-mail: icoupeau@unav.es
CTI, Director              fax:    948 425619
University of Navarra      voice:  948 425600
Pamplona, SPAIN            http://www.unav.es/cti/