Tags:
create new tag
view all tags

Question

Hi,I'm using LdapContrib for LDAP authentication and RequireRegistrationPlugin to force register.My login name like first.last@company.com and WikiName is FirstLast according to settings when register.I can login normally.

But If I do not register just click "Login" on the top of left bar,it do redirect me to Registration page,but top of left bar shows "Hello com".It looks like that LDAP get string of "com" from "first.last@company.com" as the default WikiName.Although this issue does not affect function,looks strange.I try to adjust the configure file,has no effect on this.

Help would be very much appreciate!

My LDAP configure:

$TWiki::cfg{Ldap}{Host} = 'ldaps://ldap.company.com';
$TWiki::cfg{Ldap}{Port} = 636;
$TWiki::cfg{Ldap}{Version} = '3';
$TWiki::cfg{Ldap}{Base} = 'ou=People,o=company.com';
$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}{Debug} = 1;
$TWiki::cfg{Ldap}{UserBase} = 'ou=People,o=company.com';
$TWiki::cfg{Ldap}{LoginFilter} = 'ou=China Center';
$TWiki::cfg{Ldap}{LoginAttribute} = 'uid';
$TWiki::cfg{Ldap}{WikiNameAttribute} = 'cn';
$TWiki::cfg{Ldap}{NormalizeWikiNames} = 1;
$TWiki::cfg{Ldap}{NormalizeLoginName} = 0;
$TWiki::cfg{Ldap}{AllowChangePassword} = 0;
$TWiki::cfg{Ldap}{SecondaryPasswordManager} = 'none';
$TWiki::cfg{Ldap}{GroupBase} = 'ou=Group,o=company.com';
$TWiki::cfg{Ldap}{GroupFilter} = '(objectClass=companyGroup)';
$TWiki::cfg{Ldap}{GroupAttribute} = 'cn';
$TWiki::cfg{Ldap}{MemberAttribute} = 'memberUid';
$TWiki::cfg{Ldap}{MemberIndirection} = 0;
$TWiki::cfg{Ldap}{TWikiGroupsBackoff} = 1;
$TWiki::cfg{Ldap}{NormalizeGroupName} = 0;
$TWiki::cfg{Ldap}{MapGroups} = 1;
$TWiki::cfg{Ldap}{MaxCacheAge} = 0;
$TWiki::cfg{Ldap}{PageSize} = 500;
$TWiki::cfg{Ldap}{Exclude} = 'TWikiGuest, TWikiContributor, TWikiRegistrationAgent, TWikiAdminGroup, NobodyGroup';
$TWiki::cfg{Plugins}{RequireRegistrationPlugin}{Enabled} = 1;

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin,Plugins.LdapContrib,Plugins.RequireRegistrationPlugin
Server OS: RHEL5
Web server: Apache2.0
Perl version: 5.8.8
Client OS: Windows XP
Web Browser: IE 6.0
Categories:  

-- ZhouXuan - 14 Apr 2008

Answer

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.

Are you saying that if cn=zhou.xuan, the result after logging in is still Hello com, instead of Hello Zhou Xuan?

-- ShivaGoudarzi - 14 Apr 2008

yes,my cn=Xuan Zhou,after login shows "Hello com".This is just the case that I didn't register.If I register,can display "Hello Xuan Zhou" normally.

-- ZhouXuan - 15 Apr 2008

What other filters besides ou=China Center can contain user accounts? Experimenting with different combinations of ldap attributes might give you favorable results.

-- ShivaGoudarzi - 16 Apr 2008

For $TWiki::cfg{Ldap}{WikiNameAttribute} = 'cn'; replace cn with givenName, sn, which means the first name and surname of an ldap entry.

-- ShivaGoudarzi - 22 Apr 2008

Wait, sorry--I just noticed your cn is supposed to equal givenname and sn. Our cn entry was the loginname. What groups could your users fall under (e.g., cn=users, cn=employees, etc.) that are more detailed than ou=China Center?

-- ShivaGoudarzi - 22 Apr 2008

Sorry for the long time delay.I still could not solve this issue from configuration.At last I modified the file:twiki/data/TWiki/WebLeftBarLogin.txt to restrict the display of "com",when it is "com", I set it to be "Please register".

%IF{"context authenticated" then='%IF{ "$ WIKINAME='com' " then="%MAKETEXT{"Please register"}% " 
else="%MAKETEXT{"Hello [_1]" args="[[%WIKIUSERNAME%][%SPACEOUT{%WIKINAME%}%]]"}%"}% '}%

-- ZhouXuan - 24 Apr 2008

Closing this question after more than 30 days of inactivity. Feel free to re-open if needed.

-- PeterThoeny - 03 Jun 2008

Change status to:
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-06-03 - 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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.