One possibility is to create an object with an attribute to hold the last
assigned user id. Then, every time you add another user, read that
attribute, increment it by one, and use that as the UID. Also store the
newly assigned UID back in that attribute.
This is something along the lines of what Novell is doing with their NDS
corporate edition product for NT domains (SIDs instead of UIDs).
--Moby
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Corisen
Sent: Monday, November 27, 2000 8:12 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: searching ldap for the next uidnumber
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
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list