🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.net.ldap
Article #164

login requires server key to be world readable

#164
From: Plugh
Date: Thu, 17 Feb 2005 00:36
100 lines
3396 bytes
Hi,

I've got my nss_ldap / pam_ldap to work thru TLS!!

I now have a problem with TLS key usage during login, in this case via ssh.
Despite the error, the login does ultimately succeed.

Output is shown by the logs below. The first is from slapd and the second is
what is shown in the ssh login window. I have debugging enabled in the
ldap.conf file.

Note the line TLS: could not use key file `/etc/ssl/private/serverkey.pem'.

The problem is caused because this key, defined in ldap.conf under
"tls_key", is root readable only.

The problem goes away if I make this key world readable. However, this is
the server's private key and I don't think that it should be world readable.
I think I'm doing something wrong. Hopefully someone can tell me what it is
?

Thanks in anticipation,

John







//===============slapd debug output==================/

connection_get(19): got connid=9

connection_read(19): checking for input on id=9

TLS trace: SSL_accept:before/accept initialization

TLS: can't accept.

connection_read(19): TLS accept error error=-1 id=9, closing

connection_closing: readying conn=9 sd=19 for close

connection_close: conn=9 sd=19

The logs shown below (between the second 'ldap_create' and 'ldap_unbind') in
the ldap log is repeated 7 times before the command prompt is displayed.

//===============ldap debug output ??nss_ldap or pam_ldap??==============/

login as: testuser

Authenticating with public key "General Purpose RSA Key" from agent

Last login: Wed Feb 16 23:53:09 2005 from jl-dual.lan

ldap_create

ldap_create

ldap_simple_bind

ldap_sasl_bind

ldap_send_initial_request

ldap_new_connection

ldap_int_open_connection

ldap_connect_to_host: TCP blfs.jelweb.com:636

ldap_new_socket: 4

ldap_prepare_socket: 4

ldap_connect_to_host: Trying 10.0.0.100:636

ldap_connect_timeout: fd: 4 tm: 30 async: 0

ldap_ndelay_on: 4

ldap_is_sock_ready: 4

ldap_ndelay_off: 4

TLS: could not use key file `/etc/ssl/private/serverkey.pem'.

TLS: error:0906D06C:PEM routines:PEM_read_bio:no start line pem_lib.c:637

TLS: error:0200100D:system library:fopen:Permission denied bss_file.c:276

TLS: error:20074002:BIO routines:FILE_CTRL:system lib bss_file.c:278

TLS: error:140B0002:SSL routines:SSL_CTX_use_PrivateKey_file:system lib
ssl_rsa.c:693

ldap_unbind
Technical Details
Message-ID: <4213e74a$0$53482$ed2619ec@ptn-nntp-reader03.plus.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.zanker.org!nntp-peering.plus.net!ptn-nntp-feeder01.plus.net!ptn-nntp-spool01.plus.net!ptn-nntp-spool02.plus.net!ptn-nntp-reader03.plus.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 103627,1d9d124c3dbe64b7,start
X-Google-Attributes: gid103627,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.zanker.org!nntp-peering.plus.net!ptn-nntp-feeder01.plus.net!ptn-nntp-spool01.plus.net!ptn-nntp-spool02.plus.net!ptn-nntp-reader03.plus.net!not-for-mail
From: "Plugh" <nospam@email.com>
Newsgroups: fj.net.ldap
Subject: login requires server key to be world readable 
Date: Thu, 17 Feb 2005 00:36:19 -0000
Organization: You are in a maze of twisty little passages, all alike
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Lines: 102
Message-ID: <4213e74a$0$53482$ed2619ec@ptn-nntp-reader03.plus.net>
NNTP-Posting-Host: 32dce278.ptn-nntp-reader03.plus.net
X-Trace: DXC=7Tdl7C[5[NeJoE;_aIe>7figd3Y`7Rb;n@`8gV4CC7IgT[db>`FM51hDnNG5Y6SgCj9o?a1C<oi\mBZoO70iMPKmD:lmK1TM8``
X-Complaints-To: abuse@plus.net