• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5214: Can't get groups out of ldap

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension LdapContrib Enhancement Closed   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


Following the posts from RaphaelWeis and me on this page (on 4th of january 2008):


There is a strang eproblem with getting the groups out of ldap I think the problems lies here in the code:

my $result = $this->refreshUsersCache(\%tempData);

if (defined($result) && $this->{mapGroups}) {

$result ||= $this->refreshGroupsCache(\%tempData);


after some small debugging efforts I figured out that:

the if branch is excuted, but refreshGroupsCache() doesn't get called

-- TWiki:Main/MarcoRomano - 06 Jan 2008

The function refreshUserCache() will return undef if there was an LDAP error. In that case defined($result) is false and the groups are not refreshed. Please enable debugging and try once again.

-- TWiki:Main.MichaelDaum - 07 Jan 2008

Argh ...

-- TWiki:Main.MichaelDaum - 07 Jan 2008

I enabled debugging and I have the same behavior as RaphaelWeis on hi 04 Jan 2008 Post.

I tried to change this line: $result ||= $this->refreshGroupsCache(\%tempData);

with: $result = $this->refreshGroupsCache(\%tempData);

and the nthe refreshGroupsCache gets correctly executed and from debug info I can see my groups being downloaded from ldap. What's wrong here?

-- TWiki:Main.MarcoRomano - 07 Jan 2008

To answer your first question: there is no ldap error, I can verify from the debugging infos that refreshUserCache() gets properly called and found many entries (my users).

Thanks you for you patience.

-- TWiki:Main.MarcoRomano - 07 Jan 2008

Found the error. Releasing the fix in v2.1.1

-- TWiki:Main.MichaelDaum - 07 Jan 2008

Sorry, same problem, here's the debug output:

updating cache called refreshCache called refreshUsersCache() called search(filter=objectClass=posixAccount, base=ou=Users,dc=rovernet,dc=local, scope=sub, limit=0, attrs=uid,mail,cn) proxy bind found 59 entries done reading pages got 59 keys in cache flushing db to disk replacing working copy

-- TWiki:Main.MarcoRomano - 07 Jan 2008

wait wait, I failed to applye the 2.1.1 upgrade. I'll be back in a minute smile

-- TWiki:Main.MarcoRomano - 07 Jan 2008

Yeah! Working like a charm! Thanks Michael wink

-- TWiki:Main.MarcoRomano - 07 Jan 2008

Summary Can't get groups out of ldap
ReportedBy TWiki:Main.MarcoRomano
Codebase 4.1.2
SVN Range TWiki-4.3.0, Sun, 30 Dec 2007, build 16120
AppliesTo Extension
Component LdapContrib
Priority Enhancement
CurrentState Closed

Checkins TWikirev:16164
TargetRelease n/a

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r7 - 2008-01-08 - MichaelDaum
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback