Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Authenticating users with an OpenLDAP server.

I am trying to upgrade dozens of computers on our network to Yosemite and find that I can no longer authenticate network users with OpenLDAP running on a Linux server.


During the login process, the ldap server is being accessed, and network users are correctly identified, but their passwords are not recognized. For example, if I issue a command like this on the command line,


% id netusername


it will correctly return information on that user, with all the groups, etc. The Contacts app will search the ldap database and return the correct results. It seems like the only part missing is being able to authenticate against the passwords.


This is what appears in the system log when a network user attempts to log in:


Sep 25 08:22:02 mac-mini.our.domain SecurityAgent[199]: User info context values set for netusername

Sep 25 08:22:02 mac-mini.our.domain authorizationhost[245]: Failed to authenticate user <netusername> (error: 9).


The hardware is brand new mac-minis running OS 10.10.5. Updating OX 10.9.x to 10.10.5 causes systems to lose their ability to authenticate network users. I have hundreds of computers running 10.7 through 10.9 that have worked for years. Something has changed with Yosemite but I am at a dead end understanding what it is.


I also can't use Transport Layer Security (TLS) from command line ldap queries, where I can on 10.9. For example a "ldapsearch …" will work but the same search with "ldapsearch -ZZ …" will not. I am not sure if this is related to the authentication problem or not.


The OpenLDAP server is "slapd 2.4.40 (Jul 24 2015 08:37:58) $mockbuild@c6b8.bsys.dev.centos.org:/builddir/build/BUILD/openldap-2.4.40"

Any suggestions about how to start trouble shooting this problem would be appreciated. Is there another forum that would be more appropriate for this question?

--

Jon

Mac mini, OS X Yosemite (10.10.5)

Posted on Sep 25, 2015 6:51 AM

Reply
6 replies

Oct 1, 2015 8:10 AM in response to MLPStech

A long chat with Apple support could not resolve this problem. They indicated that nothing has essentially changed between 10.9 and 10.10.5, with respect to how authentication is handled via OpenLDAP.


By turning up the debug level in the opendirectoryd.log, I am able to pinpoint the moment a good and failed login diverge. This is what a successful login looks like in on 10.9.5:


2015-10-01 09:05:18.815216 CDT - 162.870, Node: /LDAPv3/ldap-server.mydomain.org, Module: ldap - Audit - success - Verify password for record type Users 'ajanzen' node '/LDAPv3/ldap-server.mydomain.org'

2015-10-01 09:05:18.815434 CDT - 162.870, Node: /LDAPv3/ldap-server.mydomain.org, Module: ldap - ODRecordVerifyPassword completed


This is the same portion from a Yosemite failed login:


2015-10-01 08:48:22.395387 CDT - AID: 0x0000000000000000 - 231.1733, Node: /LDAPv3/ldap-server.mydomain.org, Module: ldap - Audit - Invalid credentials (5000) - Verify password for record type Users 'ajanzen' node '/LDAPv3/ldap-server.mydomain.org'

2015-10-01 08:48:22.395583 CDT - AID: 0x0000000000000000 - 231.1733, Node: /LDAPv3/ldap-server.mydomain.org, Module: ldap - ODRecordVerifyPassword failed with error 'Invalid credentials' (5000)


Does this help point in the direction of where to look further? I would appreciate any suggestions about where to start digging deeper.


--

Jon

Oct 5, 2015 5:37 AM in response to MLPStech

I have this problem resolved.


What I found was the passwords in OpenLDAP were in this format:


{MD5}<base 64 encoded md5 digest><newline character>


The base64 encoder on the Linux server always adds a a newline character (\n) to the end encoding. Multiple platforms have always ignored that character until OS X 10.10.5. Simply removing the newline before inserting the encoded password into the OpenLDAP database allows 10.10.5 and later to authenticate against that password.


--

Jon

Nov 4, 2015 11:18 AM in response to pkt73194

This depends on how the password is added to ldap. In my case I was using ruby-ldap library to modify the passwords by passing it a string containing the password. That string contained the newline character after it was converted to digest format, so removing the newline before passing the digest to ldap was what solved it for me.


You are probably creating your passwords and inserting them in some other way. You should try to examine the password string just before it is sent to the ldap library that does the updating. If it contains a newline, you have the same problem and need to truncate the string.


I hope this helps.


--

Jon

Authenticating users with an OpenLDAP server.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.