[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Uid/Gid Question
Ran into this issue as well. I had to pull the entire ou everytime,
then sort and select the greatest one. You can speed up things a little
by limiting the returned attribute to only the uidnumber.
Another option is if your application keeps track of the next available
uid itself and increments this as necessary. We use PHP so this is hard
to do, lots of locking issues. JSP application server would do this
easily as you could keep the next available uid variable in application
scope.
The totally LDAP approach, I'm guessing is to use the "server side sort"
control RFC2891 ( http://www.ietf.org/rfc/rfc2891.txt ) together with
the simple paged result control RFC2696 (
http://www.ietf.org/rfc/rfc2696.txt ) . But these controls aren't
supported in OpenLDAP as yet. Using these, you'd be able to do a
reverse server side sort on uidnumber and limit the returned values to 1
--Kervin
Aly Dharshi wrote:
Hello All,
I want to use perl to develop a script to add users and such other
functionality. I just wanted to find out what would be the simplest way
to get
the next available uid/gid combo, say if aly is 500:500 for user/group
how could I get 501 for the next user ? Is there some function ?
Cheers,
Aly.