SID-00223: registration_enabled not returning true
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
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.