Tags:
create new tag
view all tags

SID-01499: LdapContrib Auth OK but no WikiName

Status: Unanswered Unanswered TWiki version: 4.1.2 Perl version: 5.8.8
Category: LdapContrib Server OS: CentOS 5.7, kernel 2.6.18-274.3.1 Last update: 14 years ago

Short problem description: LDAP authentication is ok but the wikiname appears as jsmith, instead of JohnSmith.

LdapContrib version: $Rev: 10335 (2012-05-05) $

TWiki version: 4.1.2

Below are the LDAP settings from LocalSite.cfg, which work just fine on a dev box running the latest TWiki + LdapContrib; authentication is ok and the wikiname is JohnSmith. But on the production TWiki, after logging in, the wikiname is jsmith.

$TWiki::cfg{UserMappingManager} = 'TWiki::Users::LdapUserMapping';
$TWiki::cfg{PasswordManager} = 'TWiki::Users::LdapPasswdUser';
$TWiki::cfg{Ldap}{Host} = 'ldap.domain.net';
$TWiki::cfg{Ldap}{Port} = 389;
$TWiki::cfg{Ldap}{Version} = '3';
$TWiki::cfg{Ldap}{Base} = 'dc=domain,dc=net';
$TWiki::cfg{Ldap}{BindDN} = '';
$TWiki::cfg{Ldap}{BindPassword} = '';
$TWiki::cfg{Ldap}{UseSASL} = 0;
$TWiki::cfg{Ldap}{SASLMechanism} = 'PLAIN CRAM-MD5 EXTERNAL ANONYMOUS';
$TWiki::cfg{Ldap}{UseTLS} = 0;
$TWiki::cfg{Ldap}{TLSSSLVersion} = 'tlsv1';
$TWiki::cfg{Ldap}{TLSVerify} = 'require';
$TWiki::cfg{Ldap}{TLSCAPath} = '/etc/pki/tls/certs/';
$TWiki::cfg{Ldap}{TLSCAFile} = '/etc/pki/tls/certs/ca-bundle.crt';
$TWiki::cfg{Ldap}{TLSClientCert} = '';
$TWiki::cfg{Ldap}{TLSClientKey} = '';
$TWiki::cfg{Ldap}{Debug} = 1;
$TWiki::cfg{Ldap}{UserBase} = 'ou=People,dc=domain,dc=net';
$TWiki::cfg{Ldap}{LoginFilter} = 'objectClass=posixAccount';
$TWiki::cfg{Ldap}{UserScope} = 'sub';
$TWiki::cfg{Ldap}{LoginAttribute} = 'uid';
$TWiki::cfg{Ldap}{MailAttribute} = 'mail';
$TWiki::cfg{Ldap}{WikiNameAttributes} = 'cn';
$TWiki::cfg{Ldap}{NormalizeWikiNames} = 1;
$TWiki::cfg{Ldap}{NormalizeLoginNames} = 0;
$TWiki::cfg{Ldap}{CaseSensitiveLogin} = 0;
$TWiki::cfg{Ldap}{WikiNameAliases} = '';
$TWiki::cfg{Ldap}{AllowChangePassword} = 0;
$TWiki::cfg{Ldap}{SecondaryPasswordManager} = 'none';
$TWiki::cfg{Ldap}{GroupBase} = 'ou=Group,dc=domain,dc=net';
$TWiki::cfg{Ldap}{GroupFilter} = 'objectClass=posixGroup';
$TWiki::cfg{Ldap}{GroupScope} = 'sub';
$TWiki::cfg{Ldap}{GroupAttribute} = 'cn';
$TWiki::cfg{Ldap}{PrimaryGroupAttribute} = 'gidNumber';
$TWiki::cfg{Ldap}{MemberAttribute} = 'memberUid';
$TWiki::cfg{Ldap}{InnerGroupAttribute} = 'memberUid';
$TWiki::cfg{Ldap}{MemberIndirection} = 0;
$TWiki::cfg{Ldap}{WikiGroupsBackoff} = 1;
$TWiki::cfg{Ldap}{NormalizeGroupNames} = 0;
$TWiki::cfg{Ldap}{MapGroups} = 0;
$TWiki::cfg{Ldap}{RewriteGroups} = {};
$TWiki::cfg{Ldap}{MergeGroups} = 0;
$TWiki::cfg{Ldap}{MaxCacheAge} = 86400;
$TWiki::cfg{Ldap}{Precache} = 1;
$TWiki::cfg{Ldap}{PageSize} = 500;
$TWiki::cfg{Ldap}{Exclude} = 'TWikiGuest, TWikiContributor, RegistrationAgent, UnknownUser, TWikiAdminGroup, NobodyGroup, TWikiAdminUser, admin, guest';

Logs: I have enabled writeDebug everywhere, for LdapContrib, and this is what I have in the logs:

[Sun Jul 08 22:48:01 2012] [error] [client 10.202.1.56] - LdapContrib - finishing, referer: https://twiki.domain.net/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - constructed a new LdapContrib object, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - called initCache, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - opening ldap cache from /opt/twiki/pub/_work_areas/LdapContrib/cache.db, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - cacheAge=408, maxCacheAge=86400, lastUpdate=1341801675, refresh=0, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapPasswdUser - called checkPassword(jsmith, passU), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - called connect, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - dn=uid=jsmith,ou=people,dc=domain,dc=net, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - passwd=***, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - bind for uid=jsmith,ou=people,dc=domain,dc=net, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - finishing, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:03 2012] [error] [client 10.202.1.56] - LdapContrib - called disconnect(), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapContrib - constructed a new LdapContrib object, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapContrib - called initCache, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapContrib - opening ldap cache from /opt/twiki/pub/_work_areas/LdapContrib/cache.db, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapContrib - cacheAge=409, maxCacheAge=86400, lastUpdate=1341801675, refresh=0, referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapUserMapping - called isGroup(TWiki::User=HASH(0x31393b0)), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapUserMapping - called isGroup(TWiki::User=HASH(0x3139440)), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapUserMapping - called isGroup(TWiki::User=HASH(0x31394e0)), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapUserMapping - called isGroup(TWiki::User=HASH(0x3139580)), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapUserMapping - called isGroup(TWiki::User=HASH(0x3139620)), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapUserMapping - called isGroup(TWiki::User=HASH(0x31396c0)), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapUserMapping - called isGroup(TWiki::User=HASH(0x3139760)), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/
[Sun Jul 08 22:48:04 2012] [error] [client 10.202.1.56] - LdapUserMapping - called isGroup(TWiki::User=HASH(0x3139800)), referer: https://twiki.domain.net/bin/login/Main/WebHome?origurl=/

Compared to the logs from the dev box, the production logs are missing calls like:

[Sun Jul 08 22:53:47 2012] [error] [client 10.202.1.56] - LdapContrib - called getWikiNameOfLogin(jsmith), referer: http://...
[Sun Jul 08 22:53:48 2012] [error] [client 10.202.1.56] - LdapUserMapping - called login2cUID(jsmith), referer: http://...

Any help is greatly appreciated, thank you in advance,

-- AlexTrepca - 2012-07-09

Discussion and Answer

What {UserMappingManager} do you use? In case you use TWiki::Users::TWikiUserMapping, mapping is done in the Main.TWikiUsers topic. Set {Register}{AllowLoginName} to 1.

In case you use TWiki::Users::LdapUserMapping, the contrib should compose the WikiName from first name and last name.

-- PeterThoeny - 2012-07-11

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Unanswered
Title LdapContrib Auth OK but no WikiName
SupportCategory LdapContrib
TWiki version 4.1.2
Server OS CentOS 5.7, kernel 2.6.18-274.3.1
Web server Apache 2.2.3-53
Perl version 5.8.8
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2012-08-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.