LDAP users with dot

LDAP users with dot

by Aleksandrs Lubinskis -
Number of replies: 3

I have Moodle 2.3 site connected to MS Active directory 2008. Strange is that I can log in and get maped data for user where userneme cosists of one word, insted it is not possible to log in wit AD users where username cosists of two words seperated with dot, as exaple "john.smyth". Moodle log gives onl Login eror with no extra explanations. Any suggestions?

Average of ratings: -
In reply to Aleksandrs Lubinskis

Re: LDAP users with dot

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Humm, this is rather strange. I've just tested it in my W2008 (not R2) test environment, with a user having both the sAMAccountName and the CN set to inaki.arenaza, and it worked as expected.

Saludos. Iñaki.

In reply to Aleksandrs Lubinskis

Re: LDAP users with dot

by Aleksandrs Lubinskis -

Thanks for replay.

I found problem and also solution. There is no problem with username with dot at al IF... Problem is that LDAP module is searching for cn in AD and if it is same as samaccount name then everything is OK. If not it fails. SOmehow we had 2 types of users in our AD one where full name - cn is first name and lastname seperated with space but samaccountname with dot and others where samaccountname and cn is similar. Second ones can authenticate with no problems at all. So if authentication is needed in username field fill cn not samaccount name or change cn to propper value. Hope it helps to somebody.

In reply to Aleksandrs Lubinskis

Re: LDAP users with dot

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If all your AD users have sammaccountname with dots, then tell Moodle to use samaccountname to authenticate your users, instead of the cn.

Just set "Site administration >> Plugins >> Authentication >> LDAP server >> User attribute" to 'samaccountname' (it uses 'cn' if you leave it empty).

Saludos. Iñaki.