Hi Thornton, thanks for your help once again. Phew....this means that to add
a new user, I'll have to extract the uidnumber of all existing users, put it
in an array, sort the array, find the max+1. Not very efficient but no
choice since there's no max/min function in LDAP.  Thanks.

----- Original Message -----
From: Thornton Prime <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 28, 2000 9:43 AM
Subject: Re: searching ldap for the next uidnumber


>
> On Tue, 28 Nov 2000, Corisen wrote:
>
> > hi, i'll be designing a ldap database to store user attributes. one of
them
> > will be uidnumber. pls advise on the recommeded method to search ldap
for
> > the next available uidnumber to assign to a new user. thanks.
>
> Unfortunately, LDAP provides no mechanism for retrieving max or min
> values. Your only choice is to retrieve all the values and find the
> highest one for yourself, then increment by one.
>
> Beware, though, that there is nothing stopping two independent processes
> (or threads) from adding the same uidnumber simultaneously.
>
> thornton
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to