Closed (fixed)
Project:
LDAP integration
Version:
6.x-1.0-beta2
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
23 Mar 2009 at 17:53 UTC
Updated:
21 Jul 2010 at 19:18 UTC
LDAP authentication and datas modules works perfectly, however group module doesn't work.
There is no synchronization.
Roles were already existing, can it be a problem ?
Here is, as an attachment, a screenshot of my configuration.
Thanks for help.
| Comment | File | Size | Author |
|---|---|---|---|
| mdvfr2.png | 90.88 KB | ashledombos |
Comments
Comment #1
ashledombos commentedComment #2
ashledombos commentedThe roles were created before, ldapgroups configuration, can it be a problem ?
Comment #3
miglius commentedYou have a vertical bar at the end of the last mapping line, which shouldn't be there.
It doesn't matter if roles were existing. Should work in both cases when roles already were in the system or were not (in the later case a role will be created).
A roles are mapped and granted on the user's login. Can you install a devel module and show $user object's ldap related properties?
Comment #4
miglius commentedYou have a vertical bar at the end of the last mapping line, which shouldn't be there.
It doesn't matter if roles were existing. Should work in both cases when roles already were in the system or were not (in the later case a role will be created).
A roles are mapped and granted on the user's login. Can you install a devel module and show $user object's ldap related properties?
Comment #5
miglius commentedYou have a vertical bar at the end of the last mapping line, which shouldn't be there.
It doesn't matter if roles were existing. Should work in both cases when roles already were in the system or were not (in the later case a role will be created).
A roles are mapped and granted on the user's login. Can you install a devel module and show $user object's ldap related properties?
Comment #6
ashledombos commented>>You have a vertical bar at the end of the last mapping line, which shouldn't be there.
Oh in fact it is just the text cursor, not a vertical bar :)
>>A roles are mapped and granted on the user's login. Can you install a devel module and show $user object's ldap related properties?
OK, i will install http://drupal.org/project/devel and then tell you
Comment #7
miglius commentedComment #8
ashledombos commentedI am not sure to understand how devel works
I connected with an account that belong to an ldap group called "membres" so i should have been add in the "membres" role.
Here what i have got while connecting :
http://pastebin.ca/1370547
Is this what you asked for ?
Comment #9
miglius commentedNot really, you have posted a sql log. There should be a "Dev load" tab next to user's view and edit tabs which prints out user's object.
Can you paste her the DN of the the user you're logging as and the corresponding LDAP entry for this user in the LDAP members group?
Comment #10
ashledombos commentedHere is all that mention ldap here
The corresponding ldap entry is "memberUid" but there is no mention about member groups in dev load tab.
Comment #11
miglius commentedI can see that $user->ldap_drupal_roles is an empty array which means that user's LDAP groups are not detected.
Can you paste here the part of the LDAP entry cn=membres,ou=groupes.... which reference the user uid=ashledombos? In which format is it? Does it have a full user DN?
Comment #12
ashledombos commentedthe group dn is :
and the user dn is
The ldap is openldap over linux.
thanks a lot for your help :)
Comment #13
miglius commentedI think I have trace the bug and fixed it in the development version. Could you please test if it works with dev (or cvs) version?
Comment #14
ashledombos commentedyes i will test just now
Comment #15
ashledombos commentedOooops ! doesn't work, and furthermore i can't connect with a user : i have got :
Comment #16
miglius commentedYou may need to run upgrade.php script, depends when it was last you have checked out the code. Could you check if all table columns are created in the ldapauth database table by comparing them with the *install file schema definitions. If some column is missing you should reinstall the ldap* modules to make sure all columns are created.
Comment #17
ashledombos commentedthe only thing i did not see from ldapauth.install is indexes
Comment #18
miglius commentedThis looks correct. Can you doublecheck the ldapauth configuration since this module is responsible for users login. Also can you click the "Test" button in the ldapauth settings for the particular ldap server to make sure your credentials are all right.
Comment #19
ashledombos commentedAll seems OK
while testing in authentication module i have :
Authentication with the LDAP server for the dn uid=drupal,ou=System Accounts,dc=mandrivafr,dc=org and saved password succeeded.here is mysql request while testing : http://pastebin.ca/1372032
Do you need ldap log ?
Comment #20
miglius commentedLDAP log might be useful. Can you login directly to ldap as uid=ashledombos,ou=utilisateurs,dc=mandrivafr,dc=org with it's password?
Comment #21
miglius commentedIs anybody else having problem with authentication with the dev release?
Comment #22
ashledombos commentedHere is the ldap log, sorry to have been long, i had to wait the middle of the night for not having other people connecting at the same time :
Comment #23
miglius commentedLooks like a password is not sent:
Could you disable ldapgroups and ldapdata leaving only the ldapauth module and try login then? We would see if ldapauth itself works.
Comment #24
ashledombos commentedOk I did it and also deactivated ldap provisionning, here is my ldap log :
Comment #25
miglius commentedSo it worked, didn't it?
Comment #26
ashledombos commentedIn fact i deactivated ldapgroup, ldapdata and ldapprovisionning, so i can't say it worked :)
Comment #27
miglius commentedWhat I meant was, were you able to authenticate with all those modules but ldapauth disabled? If yes, can you enable them one by one to see which of them causes problems on your setup?
Comment #28
ashledombos commentedOK i understand, i do that
Comment #29
ashledombos commentedBTW the only problem was on group syncing, i never had problem with authentication.
Comment #30
ashledombos commentedI reactivated modules one after the other, and after having reactivated ldapgroups,
[ashledombos@ariane ~]$ sudo tail -f /var/log/ldap/ldap.log | egrep -v "SRCH|SEARCH|ACCEPT|closed|ENTRY|err=0"
[...]
Mar 28 02:54:30 ariane slapd[6840]: conn=1116 op=0 BIND dn="uid=ashledombos,ou=utilisateurs,dc=mandrivafr,dc=org" method=128
Mar 28 02:54:30 ariane slapd[6840]: conn=1116 op=0 RESULT tag=97 err=53 text=unauthenticated bind (DN with no password) disallowed
Mar 28 02:54:30 ariane slapd[6840]: conn=1117 op=0 BIND dn="" method=128
Mar 28 02:54:30 ariane slapd[6840]: conn=1117 op=7 UNBIND
Mar 28 02:54:30 ariane slapd[6840]: conn=1116 op=1 UNBIND
Mar 28 02:54:30 ariane slapd[6840]: conn=1118 op=0 BIND dn="uid=ashledombos,ou=utilisateurs,dc=mandrivafr,dc=org" method=128
Mar 28 02:54:30 ariane slapd[6840]: conn=1118 op=0 RESULT tag=97 err=53 text=unauthenticated bind (DN with no password) disallowed
[...]
But it s strange, why should authentication works and not groups syncing ?
Comment #31
ashledombos commentedMaybe drupal try to read groups as a guest ?
Comment #32
miglius commentedTry unchecking the "Do not store users' passwords during sessions" under the ldapauth configuration.
Comment #33
ashledombos commentedThis option was already unchecked, however as a test i checked it, and i still have the same output
The group module try to connect again without giving a password ?
In my ldap conf, my user "ashledombos" has all rights (create modify delete groups and users)
Comment #34
aren cambre commentedsubscribe
Comment #35
miglius commentedI have noticed in ldapauth code that a password is saved to the session after the login hook is executed (and ldapgroups looks for it). I have change the code to make sure that password is saved to the session before the login hook is fired. Please test if this also solved this issue.
Comment #36
ashledombos commentedIt works!!!!!! \o/ \o\ /o/ \o\ \o/ !!!!!!
Comment #37
ashledombos commentedThanks a lot, i made severall tests and all seems ok !
Comment #38
miglius commentedComment #40
game commentedHi all
I too am having some dificulty with the latest release of the LDAP module (beta 2) for a large site im developing, all was working fine and suddenly after various module installs and uninstalls LDAP integration no longer maps groups to roles :-( please see my post on http://drupal.org/node/674114
I have installed the devel module and looked up the dev load tab and there is no mention of anything to do with groups even being looked at only authentication. I know it is down to the site as i have 3 sites running on this server which all point to the same AD and the other 2 are fine. Also they are all configured the same in terms of LDAP. I have even created a demo site which i installed all of the modules as per the large site to see if any broke it and none did :-/ so im stumped and starting to get a little desperate with this. Any help would be amazing as im starting to feel i have exausted all my angles.
Thanks in advance
Comment #41
game commentedJust a quick advance...
this is what was posted in the dev load when the account was created.
a:4:{s:17:"ldap_authentified";b:1;s:7:"ldap_dn";s:73:"CN=tester,OU=Website Accounts,OU=Platform,DC=ilfracombe,DC=internal";s:11:"ldap_config";s:1:"2";s:7:"contact";i:1;}
thanks again :-)
Comment #42
jonthomas83 commentedI'm not sure how much this helps, but we tried to do "LDAP group to Drupal role filtering" but couldn't get it to work at all. We resorted quickly to "Group by entry", in this field we put the LDAP groups. Then we simply created the appropriately named Drupal role and found it worked perfectly.
e.g.
cn=myTeamNameOne,ou=SERVERS,o=CH
cn=myTeamNameTwo,ou=SERVERS,o=CH
cn=myTeamNameThree,ou=SERVERS,o=CH
cn=myTeamNameFour,ou=SERVERS,o=CH
Then we created the Drupal roles:
myTeamNameOne
myTeamNameTwo
myTeamNameThree
myTeamNameFour
Our "Attribute holding group members:" was 'member' so we ensured we put that in the appropriate box too.
I hope this helps, as I said, I'm no expert.
Comment #43
game commentedComment #44
game commentedHi All
after 3 days of trying to sort out this issue i have finally resolved it and found it is potentially a bug as groups were not being mapped because a trigger had been set to redirect the user to the home page when logging in. It seemed this was kicking in as soon as the user was authenticated and not completing the group > role process.
anyways I thought this was worth a mention and also help anyone else who has had this happen.
Comment #45
mecvo1984 commentedsubscribe