Loading...
 
Skip to main content

LDAP / Active directory


Re: LDAP Auth working for some, not for others...

Thanks Greg for the reply.

Having hours on this on and off over the last few weeks, I've now sorted it in 2 stages and think I've indentified a bug in TikiWiki.
STAGE 1) Last night I upgraded to PHP 5.2.6 and that seemed to solve the issue of ME not being able to login. Not sure why that worked but it does!

STAGE 2) However I still had the issue with a new user not being able to login.
The new user doesn't have an account already. I've used mysql from the command line to query the tables too just in case he actually was in there, but he's not.
To answer your question, his user account existed below the base DN I'd specified.

My LDAP settings are:
Image

I knew the credentials were correct but kept getting the error "Invalid username or password".

See my settings above and note that the "Create user if not in tiki" option is ticked.
Previously this has always worked fine but your comment make me think about that a bit more.

So, I manually created the account in Tiki - the password couldn't be blank but that password was irrelevant anyway since it would use LDAP to authenticate anyway.
HOWEVER, all our usernames are "Firstname Lastname" and tikiwiki wouldn't let me create a username with a space in it.

So I created the account using FirstNameLastnName instead and then using MySQL command line, altered it as follows:
mysql> update users_users set login="John Smith" where login="JohnSmith";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

Refreshing the user listing in Tiki showed that that change worked ok.

And the best part - he can now login just fine.

So, I think it's a bug in TikiWiki that one of the previous upgrades I did (I suspect the previous upgrade to 1.9.10.1) broke the ability to "Create user if not in tiki" for usernames that contain spaces.

I'm not sure if this isn't actually a bug though and I'm also not sure if this is a PEAR thing or a TikiWiki thing.
Any advice on reporting that bug?

Nick.