Ich habe ein SSL/TLS Problem mit meinem SLES9.
Ziel: Auf dem SLES9 ist ein eDirectory eingerichtet. Ich möchte nun
via LDAP die Benutzerauthentifizierung auf meinen Linux-Clients lösen.
Ein SLES10 kann sich authentifizieren (am SLES9), allerdings wenn in
/etc/ldap.conf die Option 'debug 9' eingestellt wird, erhalte ich
unter anderem folgende Meldung im Log [1]. Trotz dieser Meldung
funktioniert die Authentifizierung aber.
So weit so gut.
Problem: Will ich nun mit einem Debian- Client authentifizieren
(Fedora funktioniert übrigens auch nicht..), erhalte ich mit 'debug 9'
folgende Nachricht im Log [2]. Die Meldung von "su user" ergibt
lediglich "Unbekannte ID: user".
Mit einem LDAP- Browser kann ich verbinden, allerdings nur
unverschlüsselt und anonym. Sobald ich versuche, ldaps und Port 636
einzustellen, funktioniert nichts mehr ("Authentication Error").
Die Authentifizierung funktioniert allerdings nicht, wenn ich den
Parameter 'ssl start_tls' entferne, antwortet der Server kühl:
"LDAPMessage bindResponse(1) confidentialityRequired"
(ermittelt mit Wireshark)
Mit dem SSL- Client GnuTLS erhalte ich eine Meldung, die zwar keine
Fehlermeldung ist, aber bei der mir das Verständnis fehlt. Vielleicht
bringt sie ja jemandem von euch etwas [3].
Weiter angehängt sind die /etc/ldap.conf vom SLES10 (in welcher die
Parameter exakt die selben sind, wie auf der Debian- Maschine
[/etc/libnss-ldap.conf -> /etc/ldap/ldap.conf]) [4], sowie die
ebenfalls identischen /etc/nsswitch.conf [5].
Ich hoffe, dass ich nicht allzu viel Verwirrung stifte und dass
irgend jemand den besseren Durchblick hat.
Meine Frage ist eigentlich hauptsächlich, wie ich das Problem mit dem
Zertifikat gelöst bekomme: Ich muss irgendwie vom Server ein gültiges
Zertifikat bekommen. Wo/wie kann ich das auf einem SLES9 erzeugen und
anwenden?
Herzlichen Dank für eure Hilfe
Gruss,
christoph - rookie - buchli ;)
[1]
sles9:~ # cat /var/log/ldap/ldap.8149 | grep -i tls
TLS trace: SSL_connect:before/connect initialization
TLS trace: SSL_connect:SSLv2/v3 write client hello A
TLS trace: SSL_connect:SSLv3 read server hello A
TLS certificate verification: depth: 1, err: 19, subject:
/OU=Organizational CA/O=TESTUMGEBUNG, issuer: /OU=Organizational
CA/O=TESTUMGEBUNG
TLS certificate verification: Error, self signed certificate in
certificate chain
TLS certificate verification: depth: 1, err: 19, subject:
/OU=Organizational CA/O=TESTUMGEBUNG, issuer: /OU=Organizational
CA/O=TESTUMGEBUNG
TLS certificate verification: depth: 0, err: 19, subject:
/CN=sles9.net.domain.com/O=TESTUMGEBUNG, issuer: /OU=Organizational
CA/O=TESTUMGEBUNG
TLS trace: SSL_connect:SSLv3 read server certificate A
TLS trace: SSL_connect:SSLv3 read server done A
TLS trace: SSL_connect:SSLv3 write client key exchange A
TLS trace: SSL_connect:SSLv3 write change cipher spec A
TLS trace: SSL_connect:SSLv3 write finished A
TLS trace: SSL_connect:SSLv3 flush data
TLS trace: SSL_connect:SSLv3 read finished A
TLS trace: SSL3 alert write:warning:bad certificate
TLS: unable to get peer certificate.
(...)
[2]
TLS certificate verification: depth: 0, err: 66, subject:
CN=sles.net.domain.com,O=TESTUMGEBUNG, issuer: OU=Organizational
CA,O=TESTUMGEBUNG
TLS certificate verification: Error, Unknown error
TLS: can't connect.
ldap_unbind
[3]
debian:~ # gnutls-cli -p 636 x.y.z.109
Resolving '10.0.21.109'...
Connecting to 'x.y.z.109:636'...
- Certificate type: X.509
- Got a certificate list of 3 certificates.
- Certificate[0] info:
# The hostname in the certificate does NOT match 'x.y.z.109'.
# valid since: Sat Mar 3 22:23:28 CET 2007
# expires at: Wed Mar 4 22:23:28 CET 2009
# fingerprint: 1E:CA:79:91:58:86:7D:5B:FB:12:33:78:3B:60:46:8F
# Subject's DN: CN=sles9.net.domain.com,O=TESTUMGEBUNG
# Issuer's DN: OU=Organizational CA,O=TESTUMGEBUNG
- Certificate[1] info:
# valid since: Sat Mar 3 22:23:17 CET 2007
# expires at: Thu Mar 2 22:23:17 CET 2017
# fingerprint: 6F:81:8C:A5:25:AB:68:7D:5A:95:B8:D3:A0:BE:35:6B
# Subject's DN: OU=Organizational CA,O=TESTUMGEBUNG
# Issuer's DN: OU=Organizational CA,O=TESTUMGEBUNG
- Certificate[2] info:
# valid since: Sat Mar 3 22:23:17 CET 2007
# expires at: Thu Mar 2 22:23:17 CET 2017
# fingerprint: 6F:81:8C:A5:25:AB:68:7D:5A:95:B8:D3:A0:BE:35:6B
# Subject's DN: OU=Organizational CA,O=TESTUMGEBUNG
# Issuer's DN: OU=Organizational CA,O=TESTUMGEBUNG
- Peer's certificate issuer is unknown
- Peer's certificate is NOT trusted
- Version: TLS 1.0
- Key Exchange: RSA
- Cipher: AES 256 CBC
- MAC: SHA
- Compression: NULL
- Handshake was completed
- Simple Client Mode:
[4]
debian:~ # cat /etc/libnss-ldap.conf | grep -v ^\#
host x.y.z.109
base o=cag
ldap_version 3
rootbinddn cn=admin,o=cag
pam_password nds
ssl start_tls
nss_map_attribute uniqueMember member
pam_filter objectclass=posixAccount
nss_base_passwd o=cag
nss_base_shadow o=cag
nss_base_group o=cag
[5]
debian:~ # cat /etc/nsswitch.conf | grep -v ^\#
passwd: ldap files
group: ldap files
shadow: ldap files
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
bye,
Thomas
Ich kenn mich nicht mit dem Client aus, den Du hier verwendest aber sobald
Du eDirectory installiert hasst, wird dem eDirectory LDAP server ein
default certificate zugeordnet. In meinem Fall ist dies das "SSL
CertificateDNS". Nun muss Dein LDAP client, wenn er denn SSL benutzen
soll, dem Certificate vertrauen. Dazu haben die meisten Applikationen
einen TrustedRoot Store der alle Root Certificates enthaelt, denen Du
vertraust (somit wird aus einem Root Certificate ein Trusted Root
Certificate).
Um sicher zu sein, dass Du das Root Certificate des LDAP servers
verwendest, solltest Du das Trusted Root Certificate vom Key Material
Object (KMO) ,das dem LDAP Server Object zugeordnet ist exportieren (mit
iManager).
Du kannst dieses Certificate auch mit dem openssl s_client herunteladen
"openssl s_client -showcerts -connect 10.0.0.1:636 > certchain.txt"
enter "quit". Das Root Certificate findest du nun base64 encoded / PEM
format in der Textdatei. Du kannst hier das Root Certificate inklusive the
Begin und End Zeilen in eine neue Datei kopieren (z.B. orgca.pem) und dem
LDAP client zuordnen.
Per default ist der eDirectory server so installiert / konfiguriert, dass
er SSL/ TLS fuer simple binds anfordert (Attribute auf der LDAP Gruppe,
wenn ich mich nicht taeusche). Das laesst sich auch ausstellen, ist aber
aus sicherheitsgruenden nicht zu empfehlen.
Hoffe das hilft ein wenig....
Klaus
Vielen Dank für eure Antworten. Dank deinen Ausführungen funktioniert nun
die SSL-Verbindung ohne erkennbaren Fehler.
Allerdings will die Authentifizierung immernoch nicht. Anbei ist die Ausgabe,
die ich bei einem "# su <user>" erhalte [1]...
Mit dem Sniffer sehe ich die Handhsakes und einigen TLSv1-traffic...
Wenn ich nun im iManager in den Optionen der LDAP-Gruppe die Option
"[] TLS für Einzelbindungen mit Passwort erforderlich"
deaktiviere, und alles, SSL/TLS-Zeilen aus der ldap-config meines Clients
lösche, funktioniert das ganze einwandfrei; allerdings unverschlüsselt...
Die Client-Config dazu ist unter [2] angehängt.
Um in der Client-Config auf SSL "umzustellen" füge ich einfach volgende
Zeilen zur config hinzu:
ssl start_tls
TLS_CACERT /var/certs/cedesca.pem
uri ldaps://srv.sub.net.tld:636 (ändern, nicht hinzufügen)
Aber wie gesagt, es will einfach nicht.
Hat jemand noch ein paar Skills für mich? ;)
Vielen Dank und Gruss,
christoph
>>> Klaus Gast<klaus...@web.de> 21.03.2007 11:02 >>>
[1]
pc-cbu-debian2:~# su user
ldap_create
ldap_url_parse_ext(ldaps://srv.sub.net.tld:636)
ldap_create
ldap_url_parse_ext(ldaps://srv.sub.net.tld:636)
ldap_extended_operation_s
ldap_extended_operation
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP srv.sub.net.tld:636
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 10.0.x.y:636
ldap_connect_timeout: fd: 4 tm: 30 async: 0
ldap_ndelay_on: 4
ldap_is_sock_ready: 4
ldap_ndelay_off: 4
ldap_int_sasl_open: host=srv.sub.net.tld
TLS certificate verification: depth: 0, err: 0, subject: CN=srvsrv.sub.net.tld,O=TESTUMGEBUNG, issuer: OU=Organizational CA,O=TESTUMGEBUNG
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 31 bytes to sd 4
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: srv.sub.net.tld port: 636 (default)
refcnt: 2 status: Connected
last used: Thu Mar 29 08:13:32 2007
** Outstanding Requests:
* msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
** Response Queue:
Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ber_get_next: tag 0x30 len 65 contents:
ldap_read: message type extended-result msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
ber_scanf fmt ({iaa}) ber:
ldap_chase_referrals
read1msg: V2 referral chased, mark request completed, id = 1
new result: res_errno: 1, res_error: <TLS is is already established>, res_matched: <>
read1msg: 0 new referrals
read1msg: mark request completed, id = 1
request 1 done
res_errno: 1, res_error: <TLS is is already established>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_extended_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (a) ber:
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (x) ber:
ber_scanf fmt (}) ber:
ldap_msgfree
ldap_unbind
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 4
ldap_free_connection: actually freed
ldap_create
ldap_url_parse_ext(ldaps://srv.sub.net.tld:636)
ldap_extended_operation_s
ldap_extended_operation
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP srv.sub.net.tld:636
ldap_new_socket: 6
ldap_prepare_socket: 6
ldap_connect_to_host: Trying 10.0.x.y:636
ldap_connect_timeout: fd: 6 tm: 30 async: 0
ldap_ndelay_on: 6
ldap_is_sock_ready: 6
ldap_ndelay_off: 6
ldap_int_sasl_open: host=srv.sub.net.tld
TLS certificate verification: depth: 0, err: 0, subject: CN=srv.sub.net.tld,O=TESTUMGEBUNG, issuer: OU=Organizational CA,O=TESTUMGEBUNG
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 31 bytes to sd 6
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: srv.sub.net.tld port: 636 (default)
refcnt: 2 status: Connected
last used: Thu Mar 29 08:13:32 2007
** Outstanding Requests:
* msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
** Response Queue:
Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ber_get_next: tag 0x30 len 65 contents:
ldap_read: message type extended-result msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
ber_scanf fmt ({iaa}) ber:
ldap_chase_referrals
read1msg: V2 referral chased, mark request completed, id = 1
new result: res_errno: 1, res_error: <TLS is is already established>, res_matched: <>
read1msg: 0 new referrals
read1msg: mark request completed, id = 1
request 1 done
res_errno: 1, res_error: <TLS is is already established>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_extended_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (a) ber:
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (x) ber:
ber_scanf fmt (}) ber:
ldap_msgfree
ldap_unbind
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 6
ldap_free_connection: actually freed
ldap_create
ldap_url_parse_ext(ldaps://srv.sub.net.tld:636)
ldap_extended_operation_s
ldap_extended_operation
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP srv.sub.net.tld:636
ldap_new_socket: 6
ldap_prepare_socket: 6
ldap_connect_to_host: Trying 10.0.x.y:636
ldap_connect_timeout: fd: 6 tm: 30 async: 0
ldap_ndelay_on: 6
ldap_is_sock_ready: 6
ldap_ndelay_off: 6
ldap_int_sasl_open: host=srv.sub.net.tld
TLS certificate verification: depth: 0, err: 0, subject: CN=srv.sub.net.tld,O=TESTUMGEBUNG, issuer: OU=Organizational CA,O=TESTUMGEBUNG
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 31 bytes to sd 6
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: srv.sub.net.tld port: 636 (default)
refcnt: 2 status: Connected
last used: Thu Mar 29 08:13:33 2007
** Outstanding Requests:
* msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
** Response Queue:
Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ber_get_next: tag 0x30 len 65 contents:
ldap_read: message type extended-result msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
ber_scanf fmt ({iaa}) ber:
ldap_chase_referrals
read1msg: V2 referral chased, mark request completed, id = 1
new result: res_errno: 1, res_error: <TLS is is already established>, res_matched: <>
read1msg: 0 new referrals
read1msg: mark request completed, id = 1
request 1 done
res_errno: 1, res_error: <TLS is is already established>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_extended_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (a) ber:
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (x) ber:
ber_scanf fmt (}) ber:
ldap_msgfree
ldap_unbind
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 6
ldap_free_connection: actually freed
ldap_err2string
Unbekannte ID: user
pc-cbu-debian2:~#
[2]
uri ldap://srv:389
ldap_version 3
rootbinddn cn=admin,o=cag
pam_password nds
Du sagst hier, dass der Sniffer trace TLSv1 traffic zeigt. Es gibt mit
NetWare 6.5 ein Problem mit TLSv1 (fix in SP7). NetWare 6.5 kann kein
TLSv1 und wird auf einen SSL Client Hello Request mit TLSv1 nicht
antworten (timeout) anstatt ein SSLv3 Server Hello (bug).
Ich habe in der "ldap.conf" folgenden Eintrag von TLSv1 auf SSLv3
geaendert:
===============================
tls_ciphers SSLv3
===============================
Hier nochmal mein ldap.conf
============================================================
#
# This is the configuration file for the LDAP nameservice
# switch library, the LDAP PAM module and the shadow package.
#
# Your LDAP server. Must be resolvable without using LDAP.
host 10.2.1.241
# The distinguished name of the search base.
base o=ema
# The LDAP version to use (defaults to 3
# if supported by client library)
ldap_version 3
# Don't try forever if the LDAP server is not reacheable
bind_policy soft
# The distinguished name to bind to the server with.
# Optional: default is to bind anonymously.
#binddn cn=Manager,dc=example,dc=com
# The credentials to bind with.
# Optional: default is no credential.
#bindpw secret
# The distinguished name to bind to the server with
# if the effective user ID is root. Password is
# stored in /etc/ldap.secret (mode 600)
#rootbinddn cn=Manager,dc=example,dc=com
# The port.
# Optional: default is 389.
#port 389
# The search scope.
#scope sub
#scope one
#scope base
# Search timelimit
#timelimit 30
# Bind timelimit
#bind_timelimit 30
# Idle timelimit; client will close connections
# (nss_ldap only) if the server has not been contacted
# for the number of seconds specified below.
#idle_timelimit 3600
# Filter to AND with uid=%s
#pam_filter objectclass=account
# The user ID attribute (defaults to uid)
#pam_login_attribute uid
# Search the root DSE for the password policy (works
# with Netscape Directory Server)
#pam_lookup_policy yes
# Check the 'host' attribute for access control
# Default is no; if set to yes, and user has no
# value for the host attribute, and pam_ldap is
# configured for account management (authorization)
# then the user will not be allowed to login.
#pam_check_host_attr yes
# Group to enforce membership of
#pam_groupdn cn=PAM,ou=Groups,dc=padl,dc=com
# Group member attribute
#pam_member_attribute uniquemember
# Specify a minium or maximum UID number allowed
#pam_min_uid 0
#pam_max_uid 0
# Template login attribute, default template user
# (can be overriden by value of former attribute
# in user's entry)
#pam_login_attribute userPrincipalName
#pam_template_login_attribute uid
#pam_template_login nobody
# Do not hash the password at all; presume
# the directory server will do it, if
# necessary. This is the default.
#pam_password clear
# Hash password locally; required for University of
# Michigan LDAP server, and works with Netscape
# Directory Server if you're using the UNIX-Crypt
# hash mechanism and not using the NT Synchronization
# service.
pam_password nds
# Remove old password first, then update in
# cleartext. Necessary for use with Novell
# Directory Services (NDS)
#pam_password nds
# Update Active Directory password, by
# creating Unicode password and updating
# unicodePwd attribute.
#pam_password ad
# Use the OpenLDAP password change
# extended operation to update the password.
#pam_password exop
# Redirect users to a URL or somesuch on password
# changes.
#pam_password_prohibit_message Please visit http://internal to change your password.
# RFC2307bis naming contexts
# Syntax:
# nss_base_XXX base?scope?filter
# where scope is {base,one,sub}
# and filter is a filter to be &'d with the
# default filter.
# You can omit the suffix eg:
# nss_base_passwd ou=People,
# to append the default base DN but this
# may incur a small performance impact.
#nss_base_passwd ou=People,dc=padl,dc=com?one
#nss_base_shadow ou=People,dc=padl,dc=com?one
#nss_base_group ou=Group,dc=padl,dc=com?one
#nss_base_hosts ou=Hosts,dc=padl,dc=com?one
#nss_base_services ou=Services,dc=padl,dc=com?one
#nss_base_networks ou=Networks,dc=padl,dc=com?one
#nss_base_protocols ou=Protocols,dc=padl,dc=com?one
#nss_base_rpc ou=Rpc,dc=padl,dc=com?one
#nss_base_ethers ou=Ethers,dc=padl,dc=com?one
#nss_base_netmasks ou=Networks,dc=padl,dc=com?ne
#nss_base_bootparams ou=Ethers,dc=padl,dc=com?one
#nss_base_aliases ou=Aliases,dc=padl,dc=com?one
#nss_base_netgroup ou=Netgroup,dc=padl,dc=com?one
# attribute/objectclass mapping
# Syntax:
#nss_map_attribute rfc2307attribute mapped_attribute
#nss_map_objectclass rfc2307objectclass mapped_objectclass
# configure --enable-nds is no longer supported.
# For NDS now do:
#nss_map_attribute uniqueMember member
# configure --enable-mssfu-schema is no longer supported.
# For MSSFU now do:
#nss_map_objectclass posixAccount User
#nss_map_attribute uid msSFUName
#nss_map_attribute uniqueMember posixMember
#nss_map_attribute userPassword msSFUPassword
#nss_map_attribute homeDirectory msSFUHomeDirectory
#nss_map_objectclass posixGroup Group
#pam_login_attribute msSFUName
#pam_filter objectclass=User
#pam_password ad
# configure --enable-authpassword is no longer supported
# For authPassword support, now do:
#nss_map_attribute userPassword authPassword
#pam_password nds
# For IBM SecureWay support, do:
#nss_map_objectclass posixAccount aixAccount
#nss_map_attribute uid userName
#nss_map_attribute gidNumber gid
#nss_map_attribute uidNumber uid
#nss_map_attribute userPassword passwordChar
#nss_map_objectclass posixGroup aixAccessGroup
#nss_map_attribute cn groupName
#nss_map_attribute uniqueMember member
#pam_login_attribute userName
#pam_filter objectclass=aixAccount
#pam_password clear
# Netscape SDK LDAPS
#ssl on
# Netscape SDK SSL options
#sslpath /etc/ssl/certs/cert7.db
# OpenLDAP SSL mechanism
# start_tls mechanism uses the normal LDAP port, LDAPS typically 636
ssl start_tls
nss_map_attribute uniqueMember member
pam_filter objectclass=posixAccount
nss_base_passwd o=novell
nss_base_shadow o=novell
nss_base_group o=novell
ssl on
# OpenLDAP SSL options
# Require and verify server certificate (yes/no)
# Default is "no"
#tls_checkpeer yes
# CA certificates for server certificate verification
# At least one of these are required if tls_checkpeer is "yes"
tls_cacertfile /etc/ssl/certs/eDirectory.cert
#tls_cacertdir /etc/ssl/certs
# SSL cipher suite
# See man ciphers for syntax
tls_ciphers SSLv3
# Client certificate and key
# Use these, if your server requires client authentication.
#tls_cert
#tls_key
sels10ldap:/etc #
sels10ldap:/etc # gedit ldap.conf
(gedit:15479): Gtk-WARNING **: cannot open display:
sels10ldap:/etc #
sels10ldap:/etc # cat ldap.conf
#
# This is the configuration file for the LDAP nameservice
# switch library, the LDAP PAM module and the shadow package.
#
# Your LDAP server. Must be resolvable without using LDAP.
host 147.2.91.241
# The distinguished name of the search base.
base o=novell
# The LDAP version to use (defaults to 3
# if supported by client library)
ldap_version 3
# Don't try forever if the LDAP server is not reacheable
bind_policy soft
# The distinguished name to bind to the server with.
# Optional: default is to bind anonymously.
#binddn cn=Manager,dc=example,dc=com
# The credentials to bind with.
# Optional: default is no credential.
#bindpw secret
# The distinguished name to bind to the server with
# if the effective user ID is root. Password is
# stored in /etc/ldap.secret (mode 600)
#rootbinddn cn=Manager,dc=example,dc=com
# The port.
# Optional: default is 389.
#port 389
# The search scope.
#scope sub
#scope one
#scope base
# Search timelimit
#timelimit 30
# Bind timelimit
#bind_timelimit 30
# Idle timelimit; client will close connections
# (nss_ldap only) if the server has not been contacted
# for the number of seconds specified below.
#idle_timelimit 3600
# Filter to AND with uid=%s
#pam_filter objectclass=account
# The user ID attribute (defaults to uid)
#pam_login_attribute uid
# Search the root DSE for the password policy (works
# with Netscape Directory Server)
#pam_lookup_policy yes
# Check the 'host' attribute for access control
# Default is no; if set to yes, and user has no
# value for the host attribute, and pam_ldap is
# configured for account management (authorization)
# then the user will not be allowed to login.
#pam_check_host_attr yes
# Group to enforce membership of
#pam_groupdn cn=PAM,ou=Groups,dc=padl,dc=com
# Group member attribute
#pam_member_attribute uniquemember
# Specify a minium or maximum UID number allowed
#pam_min_uid 0
#pam_max_uid 0
# Template login attribute, default template user
# (can be overriden by value of former attribute
# in user's entry)
#pam_login_attribute userPrincipalName
#pam_template_login_attribute uid
#pam_template_login nobody
# Do not hash the password at all; presume
# the directory server will do it, if
# necessary. This is the default.
#pam_password clear
# Hash password locally; required for University of
# Michigan LDAP server, and works with Netscape
# Directory Server if you're using the UNIX-Crypt
# hash mechanism and not using the NT Synchronization
# service.
pam_password nds
# Remove old password first, then update in
# cleartext. Necessary for use with Novell
# Directory Services (NDS)
#pam_password nds
# Update Active Directory password, by
# creating Unicode password and updating
# unicodePwd attribute.
#pam_password ad
# Use the OpenLDAP password change
# extended operation to update the password.
#pam_password exop
# Redirect users to a URL or somesuch on password
# changes.
#pam_password_prohibit_message Please visit http://internal to change your password.
# RFC2307bis naming contexts
# Syntax:
# nss_base_XXX base?scope?filter
# where scope is {base,one,sub}
# and filter is a filter to be &'d with the
# default filter.
# You can omit the suffix eg:
# nss_base_passwd ou=People,
# to append the default base DN but this
# may incur a small performance impact.
#nss_base_passwd ou=People,dc=padl,dc=com?one
#nss_base_shadow ou=People,dc=padl,dc=com?one
#nss_base_group ou=Group,dc=padl,dc=com?one
#nss_base_hosts ou=Hosts,dc=padl,dc=com?one
#nss_base_services ou=Services,dc=padl,dc=com?one
#nss_base_networks ou=Networks,dc=padl,dc=com?one
#nss_base_protocols ou=Protocols,dc=padl,dc=com?one
#nss_base_rpc ou=Rpc,dc=padl,dc=com?one
#nss_base_ethers ou=Ethers,dc=padl,dc=com?one
#nss_base_netmasks ou=Networks,dc=padl,dc=com?ne
#nss_base_bootparams ou=Ethers,dc=padl,dc=com?one
#nss_base_aliases ou=Aliases,dc=padl,dc=com?one
#nss_base_netgroup ou=Netgroup,dc=padl,dc=com?one
# attribute/objectclass mapping
# Syntax:
#nss_map_attribute rfc2307attribute mapped_attribute
#nss_map_objectclass rfc2307objectclass mapped_objectclass
# configure --enable-nds is no longer supported.
# For NDS now do:
#nss_map_attribute uniqueMember member
# configure --enable-mssfu-schema is no longer supported.
# For MSSFU now do:
#nss_map_objectclass posixAccount User
#nss_map_attribute uid msSFUName
#nss_map_attribute uniqueMember posixMember
#nss_map_attribute userPassword msSFUPassword
#nss_map_attribute homeDirectory msSFUHomeDirectory
#nss_map_objectclass posixGroup Group
#pam_login_attribute msSFUName
#pam_filter objectclass=User
#pam_password ad
# configure --enable-authpassword is no longer supported
# For authPassword support, now do:
#nss_map_attribute userPassword authPassword
#pam_password nds
# For IBM SecureWay support, do:
#nss_map_objectclass posixAccount aixAccount
#nss_map_attribute uid userName
#nss_map_attribute gidNumber gid
#nss_map_attribute uidNumber uid
#nss_map_attribute userPassword passwordChar
#nss_map_objectclass posixGroup aixAccessGroup
#nss_map_attribute cn groupName
#nss_map_attribute uniqueMember member
#pam_login_attribute userName
#pam_filter objectclass=aixAccount
#pam_password clear
# Netscape SDK LDAPS
#ssl on
# Netscape SDK SSL options
#sslpath /etc/ssl/certs/cert7.db
# OpenLDAP SSL mechanism
# start_tls mechanism uses the normal LDAP port, LDAPS typically 636
ssl start_tls
nss_map_attribute uniqueMember member
pam_filter objectclass=posixAccount
nss_base_passwd o=novell
nss_base_shadow o=novell
nss_base_group o=novell
ssl on
# OpenLDAP SSL options
# Require and verify server certificate (yes/no)
# Default is "no"
#tls_checkpeer yes
# CA certificates for server certificate verification
# At least one of these are required if tls_checkpeer is "yes"
tls_cacertfile /etc/ssl/certs/eDirectory.cert
#tls_cacertdir /etc/ssl/certs
# SSL cipher suite
# See man ciphers for syntax
tls_ciphers SSLv3
# Client certificate and key
# Use these, if your server requires client authentication.
#tls_cert
#tls_key
=============================================================
Gruss
Klaus
Cool! Es funktioniert.
Die verschlüsselte Autehntifizierung läuft ;)
Hier [1] noch meine /etc/libnss-ldap.conf
(welche auch nach /etc/ldap/ldap.conf verlinkt ist)
Vielen Dank. ;)
Gruss,
christoph
[1]
pc-cbu-debian2:~# cat /etc/libnss-ldap.conf | grep .. | grep -v ^\#
uri ldaps://srv.sub.net.com:636
ldap_version 3
rootbinddn cn=admin,o=cag
pam_password nds
nss_map_attribute uniqueMember member
pam_filter objectclass=posixAccount
nss_base_passwd o=cag
nss_base_shadow o=cag
nss_base_group o=cag
ssl start_tls
ssl on
TLS_CACERTFILE /var/certs/cedesca.pem
pc-cbu-debian2:~#