Radically trim down winbind?
vl at samba.org
Tue Nov 15 07:35:40 UTC 2016
On Mon, Nov 14, 2016 at 10:07:28PM -0700, Jeff Sadowski wrote:
> I use getent with sort to find the highest unix id number for rfc2307. What
> is the best way to do this if you get rid of the getent listing feature?
I haven't tried, but can't you use the LDAP_SERVER_SORT_OID control code
to sort the uids and just look at the first one, i.e. set a sizelimit in
LDAP to 1 or just a few? If the SERVER_SORT_OID only works for strings,
you could also try a binary search. Start at 1 and 1.000.000, pick the
middle one and iterate until you found the highest one. In the long run,
this will be vastly more efficient. 20 single-object searches instead
of listing thousands of users, doing the sort client-side.
More information about the samba-technical