| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-18-2008, 02:07 PM
|
#1
|
|
Member
Registered: Dec 2004
Posts: 47
Rep:
|
Openlap + TLS not working due to certificate issues
I am running a samba/ldap server with openldap 2.3 and CentOS 5.2. I have got a fully functional, replicating, ldap environment which I am trying to secure with TLS. I have very probably read every how to for ldap and TLS on the internet but I can't seem to get it to work correctly. I have created a CA, server certificate, signed it, and I've used the make-dummy-cert self signed certificate, etc. I've tried a dozen different ways. When I run authconfig-tui and change my authentication to use TLS, I get the error message Error:PEM routines:PEM_read_bio:no start line  em_lib.c:644:Expecting: TRUSTED CERTIFICATE and it quits working.
So - can anyone instruct me on how to make this work correctly? Also - can anyone explain to me how the certificates work with multiple servers? Do I need a separate certificate for each server? Any information will be helpful - thanks.
|
|
|
|
12-29-2008, 11:57 PM
|
#2
|
|
Member
Registered: Dec 2004
Posts: 47
Original Poster
Rep:
|
Seriously?? No one out there is sucessfully running a secure samba ldap environment? I would REALLY appeciate some help on this or any input on how others are doing this...
|
|
|
|
12-30-2008, 12:27 AM
|
#3
|
|
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
|
In my experience, anything related to OpenLDAP absolutely refuses to work with self-signed certificates, and unfortunately most certificate HOW-TOs only tell you how to make a self-signed cert. You need to make sure the CN for the CA cert is not a hostname, however the CN for your server cert does need to be the FQDN of the machine.
Read the documentation for the config files to make sure they have an option that points either to a CA bundle file that includes your CA cert, or a directory that includes it (or figure out where the default bundle/path is and add your CA cert there).
Basically your cert is failing validation because it's not trusted, which is either because the CA isn't trusted, or the cert itself is self-signed.
|
|
|
|
03-30-2009, 04:24 PM
|
#4
|
|
LQ Newbie
Registered: Aug 2004
Posts: 14
Rep:
|
self-signed certs work with Open LDAP + fix for Expecting: TRUSTED CERTIFICATE
Self signed certificates work just fine with OpenLDAP, you just need to make sure the root self-signed public certificate, typically named cacert.pem, makes it into the ca-bundle.crt file in the cacerts directory. And it will need to be placed in that file for all the servers contacting that OpenLDAP instance.
I discovered the real reason for why, when running authconfig, one might receive one or more "Expecting: TRUSTED CERTIFICATE" errors. If you've configured the linux box to use LDAP at all, authconfig will automatically "rehash" the certificate directory. (Check the ldap.conf file for TLS_CERT* lines). During the "rehash" operation, for every file in the certificate directory that is not a valid PEM certificate file, you will get that warning/error printed out.
So, in reality, this is not actually an error for authconfig, but it appears to be, and it's damned alarming.
Solution: remove all non-certificate files from that directory.
I had placed a host key file that I was allowing the LDAP user to read in my cacert directory, and then began receiving the error. Renaming that file to start with a '.' also eliminated the error from occurring.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:24 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|