[Pkg-shadow-devel] slow useradd -r on LDAP box

Peter Vrabec pvrabec at redhat.com
Wed Jul 1 10:08:25 UTC 2009

Dear upstream,

we both know that useradd -r (or useradd) is slow(~minutes) on box with LDAP 
accounts. Useradd -r is special case, because it is used by package system, So 
when you want to install your favourite daemon you have to wait a long time 
which is annoying.

I'd like to discuss  possibility of changing alg. of find_new_uid/gid little 
bit. What if we use getpwuid() to find free SYSTEM UIDs!. Calling getpwuid() 
max 1000 times takes almost same time as getpwent() on the box without LDAP 
but significantly less than getpwent() on box with LDAP with 10000 users. 

What do you think?

I would also like to ask if you agree with current implementation of system 
uid look up. In case of user accounts we look for 
* first max free UID. 
In case of system accounts we look for 
* first free UID in reverse order. 
Should we look for 
* first min free UID in reverse order?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20090701/ba395a3c/attachment.htm>

More information about the Pkg-shadow-devel mailing list