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

Re: Retriving new uids

1 Июль 2003 14:19, Ghe Rivero написал:
> hi!
> 	I've been looking a way to get unused uid for the new accounts
> creations but i haven't found any information about how to do that.
> Anybody has any idea? Thx in advanced.
> 	Ghe Rivero

If You have only a few users, you can make search (for example, perl-ldap) and 
load attributes "uid" for all users, sort and get first unused, if you have a 
lot of users and groups, I would sugest to make special subtree with all 
aunused ranges of uids and gids and each time you need get it with two 
queries to LDAP server (one to retrive first unused and second to update)