-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
When using LDAP authentication the first time, warnings may appear in logs #5636
Comments
Cacti 1.2.26 error on LDAP authentication the first time
Okay, this should be resolved now. |
Cacti 1.2.26 error on LDAP authentication the first time
Sorry for that question, but the DEV version is 1.3.0, dose that mean you stop the code on 1.2.x ? Or if I update from the 1.2.x branch is still ok ? |
For production is better 1.2.x branch. 1.2.x is stable. From 1.2.25 gets only fixes and security updates, no new features. We appreciate it when someone tries 1.3 and reports bugs to us |
Thanks @xmacan So I update to the latest 1.2.x
|
Can you show the error? |
So, I think that backtrace might be some ill-placed debug code. I'll take a look as the login search appears to succeed. Might be the result of late night code work. That happens you know. |
Can you search in A screen shot is sufficient. |
So I find it inside abstract class LdapError
|
The issue is there is no error thought right? Are you still able to login? |
Yess, I can login, it take me 2 retry, the first time it create the profile based on the user template, and the second time it allow me to connect. But what is missing it's the retrieve of the Full Name and the eMail address from the LDAP. |
Actually I have the domain in this record, not an IP or hostname of the AD. |
Okay, so RRDNS or a vip then. Good. I'm on the road. Can you revert the lib/ldap.php and let me know if it works? |
Damn! Here is a debug on a 1.2.25 running version:
This version give me back displayname and email. The same login test with 1.2.26, and the ldap from 1.2.x:
And last one Cacti 1.2.26, last ldp.php from devellop branch:
|
So, can I read that as the old library works? |
Unfortunately no! As for the information from the AD (displayname and email) it dosen't work. |
Okay. |
hey @arno-st Would you be able to tell me what LDAP server you are running ? |
I'm connecting to windows 2016 |
Awesome I'll send you an email and we can work a time out |
Hi everyone, some years ago i have pulled commit , that resoled problem of empty User email and description ( issue #4768 ) in cacti 1.2.16. Now i have updated to 1.2.26 and see that problem appeared again. |
Go to 1.2.27, and report back again. |
Hi, As for the log of the 2 events:
|
Hi, not sure if this is related to the "need to login twice" problem. But since collection of user attributes also is part of this issue i want to add the following. We are on 1.2.27 as of 15th of may 2024. Currently first time users do not need to login twice. I think we had that in the past, but that was quite some time ago. @arno-st , since you still see "fields not found code: 0" in the log, I assume, these fields are still not filled automatically. I think you have two issues. I had the same since I was used to write attributes equal as they are in AD. But cacti documentation says, you should write attributes with small letters, regardless how they are written in AD. (https://docs.cacti.net/Settings-Auth-LDAP.md#mapping-an-ldap-user-to-a-cacti-user) So it should be "displayname". For the second: We do not have an attribute "EmailAddress" in our AD. It is just "mail". Maybe you want to test with mail? @ALL This is, how it was till today. Blue are server settings from user domains, green are settings from general ldap. As you can see blue chooses one of two servers and green combines two servers with a space in between (just as it is typed into configuration): Since search settings and so on are hidden on "configuration -> settings -> authentication" page if you choose "Multiple LDAP/AD Domains" I changed to "LDAP authentication" and copied all the settings from our first user domain. Group Settings, Search Setting, CN settings and so on. I saved and tested. Worked. Now I changed back to "Multiple LDAP/AD Domains". As said, I'm not sure, if this relates to "need to login twice". |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@bmfmancini , this was a sign to you Sean do you have any time to work on it? |
@TheWitness yep going to keep working with @arno-st on this I have not been able to re-produce |
So, so far I find out that the error displayed, is not an error actually, it's just the way it give a result anytime (in RecordError (it give the result, and the stack trace), Confusing but ok: So now I can look why at the first time it need 2 login to access Cacti, and why the field username and email are not populated. By the way with 1.2.27, no more ERROR PHP DEPRECATED, so forget what I said on Slack about that. I keep you informed |
I'm a little lost, so I made a tcpdump of my query, here is what I found: At now time I see any kind of request for the detail of the user, where I suppose to find username, email. But on a old server, after 7 I can see cacti is connecting to the LDAP with the authenticated user, to retentive the fullnam and email. So I have to find where it's suppose to call for this 2 fields |
I found 1 big difference. But the mode the DB, on the old server (who give me the fullname and email) it display 2, and on the new server it display 0 How come ? |
changing to mode 2, I got this error: This log is placed under 'domains_login_process', over here: |
Let me. See if I get the same result |
@arno-st, can you do a live Zoom session on Wednesday morning EDT (America/Detroit)? |
Wednesday is complicate. |
* First attempt to fix this issue.
@arno-st, thanks for joining us for the dynamic debug and resolution of the issue. We are all good now. |
* First attempt to fix this issue.
On a fresh install on cacti 1.2.26, with php 8.2.14
When I setup the authentication method 'Multiple LDAP/AD domain', and create a profile under User Domains.
I setup a template account for this, and use some LDAP config.
And a LDAP CN Setting to retreive the Full name of the user.
When a user is connectiong the first time I got the following error
It only happen the first time, and the files Full Name of this user is empty.
The text was updated successfully, but these errors were encountered: