Tags:
create new tag
view all tags

SID-00223: registration_enabled not returning true

Status: Answered Answered TWiki version: 4.2.4 Perl version:
Category: CategoryAuthentication Server OS: RedHat Linux Last update: 16 years ago

Hi,

We have LDAP authentication set up but registration is still required which is great. However, after authentication, users can go to TwikiRegistration but the "context registration_enabled" returns false even though I am positive {Register}{EnableNewUserRegistration} is checked in the configuration. Because it is returning false users aren't able to register. I can comment out the lines that check for registration_enabled but I would prefer to fix things so the pages works as it should. What am I missing?

-- JohnCherry - 26 Mar 2009

Discussion and Answer

I think that is a design decision/limitation of the LdapContrib. The trick is to use {PasswordManager} = 'TWiki::Users::LdapUser; and {UserMappingManager} = 'TWiki::Users::TWikiUserMapping'; instead of 'TWiki::Users::LdapUserMapping'.

In addition, you need to patch twiki/lib/TWiki/Users/TWikiUserMapping.pm :

--- TWikiUserMapping.pm.save1   2008-10-24 21:22:46.000000000 -0400
+++ TWikiUserMapping.pm   2008-11-14 13:49:51.000000000 -0500
@@ -74,7 +74,7 @@
   #if password manager says sorry, we're read only today
   #'none' is a special case, as it means we're not actually using the password manager for
   # registration.
-    if ($this->{passwords}->readOnly() && ($TWiki::cfg{PasswordManager} ne 'none')) {
+    if ($this->{passwords}->readOnly() && ($TWiki::cfg{PasswordManager} !~ /^(none|TWiki::Users::LdapUser)$/)) {
       $session->writeWarning( 'TWikiUserMapping has TURNED OFF EnableNewUserRegistration, because the password file is read only.' );
       $TWiki::cfg{Register}{EnableNewUserRegistration} = 0;
   }
@@ -284,7 +284,7 @@
               'New password did not match existing password for this user');
       }
       # User exists, and the password was good.
-    } else {
+    } elsif( $TWiki::cfg{PasswordManager} ne 'TWiki::Users::LdapUser' ) {
       # add a new user

       unless( defined( $password )) {

-- PeterThoeny - 26 Mar 2009

I circled back with the gentleman who originally installed TWiki and he stated that he didn't install the LDAP plugin. He only set up kerberos authentication. So I don't know that my question was really relevant after that revelation. The answer did prompt me to eventually get to the bottom of it so not all was lost. Thanks.

-- JohnCherry - 27 Mar 2009

      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 Answered
Title registration_enabled not returning true
SupportCategory CategoryAuthentication
TWiki version 4.2.4
Server OS RedHat Linux
Web server Apache
Perl version

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2009-03-27 - JohnCherry
 
  • 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.