-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LDAP groups #55
Comments
Or have i missed something? Couldn't find this feature. |
No, it's not currently supported. Likely such a change would need some refactoring of the |
That would be really great if you could do this. |
The
|
As far as i can say everything is working. |
Thank you again for your great work and your great support, it's really great. If you wish a donation for your work just give me a account where it can be transfered. |
You're welcome. It's good to know this tool is still finding use out there. No payment necessary, but thank you very much for offering. |
Hello, FIrst issue, i'm not able to add a group to add a ldap group as a server administrator. |
|
Looks like you have to edit your code in keys/requesthandler.php for LDAP groups. |
And if user is in the ldap group by first login:
|
In both cases i know where the problem is, if the logs are to less just contact me. |
Apologies for the trouble, clearly I needed to do more testing, which I have done now. I've pushed a fix for the LDAP group problem. As for your other problem, I believe it is unrelated to the group changes, and is caused by a user in your LDAP directory that doesn't have a |
Hello, No thats sureley not the problem, users without mail can't be added via ldap. Edit: |
And your group fix still have a problem if the user is still added to the group: With a new refresh it is working but the first access on the site fails. |
If this was the error you were getting:
then I do not see how it can be anything other than a user in LDAP missing a mail attribute. Especially since the previous 2 lines, fetching the user_id and user_name lines for the same user succeeded without error. |
Maybe i've the problem, my config is looking like that: I'm using a samba ad, the users have no uid attribute, they have one but they are empty. |
Yes, this is still problematic it seems. My testing did not reveal this possibly because my very limited test setup does not have outgoing email enabled. This is going to be tricky to solve properly as there are circular dependencies going on here. |
Wouldn't it be better you take the relations from the config.ini? |
This is getting very confusing having 2 different issues in the same ticket. If you're referring to the LDAP attributes used, those are indeed using the values from config.ini. Lines 314-316 of |
No, the problem is not the mail, every user has a mail, also in the db. a user look like this in the db: |
Sorry, but again I repeat: if you are encountering the error on line 316 of model/user.php and the error is that the |
Right now i`m talking about adding groups as admin to servers and this is the error message:
|
Right, and that is a completely different error to the one I was talking about. That comment was referring to this error that you mentioned earlier:
|
I now know what the problem is. But the group normaly doens't have a mail address. |
That would indicate that a group is being treated as a user. That is concerning. |
Exactly, so your |
It should not be getting even that far. It would mean that |
Before you didn't have this problem, because you are not using ldap groups. |
As far as I can tell it shouldn't matter. If the entity is an object of type Do you have any record in the |
And a follow-up question: are your groups in LDAP in separate subtrees from your users? ie. are your |
No of course no record in user table matches the group name in ldap. We have naming conventions on our ldap, so thats impossible. |
No its the same subtree. |
So you just difference it by subtree? That would explain the problem. |
Typically groups would be in a separate subtree from users, eg. as in the example config:
If they are in the same subtree then it could potentially cause problems if there were a naming conflict. But you say that you have separate conventions for groups, so I'm not sure that's possible. It seems to be that it is trying to add a new user to the database, and for some reason it has fetched the details of a group from LDAP. I can't really explain that at the moment. |
Your stacktrace is showing the following path through the code:
It hasn't reached any group-related code at this point. It is trying to fetch details of the user specified in the form, a user that is not yet in the database. It is at this point that whatever it has fetched from LDAP is lacking the |
Yes, right now, the group and users are in the same subtree. |
And yes the group was now added as user. |
Ok, so we've got to the bottom of this. You are trying to add a group as an administrator of a server. Line 45 of This problem is therefore unrelated to the changes made in this ticket to support fetching LDAP groups for users. I'm not sure there's any good solution for it either. |
The only proper fix for that issue I can think of is having 2 separate fields in the UI, one for adding a user as an admin, and one for adding a group. Even so, it would still encounter errors if you accidentally used the wrong field. |
And you can't add a filter for users and for groups in the ldap search? |
Possibly (edit: in fact probably indeed the best solution). That would require adding more settings to the config file for user_query and group_query. I'll make a separate ticket for that. |
Filed #60 for the user/group mismatch issue. |
Just for your information:
In a new Database there was no problem. |
#60 has been resolved, you can now add I also noticed the |
That should just leave one remaining bug: first login group membership triggering an error due to |
Any chance to get this solved? Or is this a bigger change? |
There's a tentative fix for this on the |
Login is working as it should now. |
I tested a lot right now. |
As long as it is working for you, this should be a reasonably low-risk change. I'll merge it now. |
Ok fine. |
Hello,
Thank you for this tool, it is great.
I've one question.
Would it be possible to manage groups over the ldap (not only the admin group)?
This would be better to manage.
The text was updated successfully, but these errors were encountered: