[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Greatest value
On Wed, Nov 22, 2000 at 04:42:54PM -0600, Matthew Hoskins wrote:
> My LDAP stores UIDnumbers for users on the UNIX systems we administer.
> To create a new user, I need the next available UID (which is the
> highest UID + 1).
Not an LDAP solution, but I used the following trick with NIS+: store
the last allocated uid in a local file. When creating a new user, read this
stored value, increment it, and do an LDAP search to see if it exists. If
it does, repeat the process.
It's not a very elegant solution, but works nicely as far as you use the
same machine to create all new users.
Gabor
--
Gabor Gombas Eotvos Lorand University
E-mail: gombasg@inf.elte.hu Hungary