[Date Prev][Date Next] [Chronological] [Thread] [Top]

slapd crashes every time it is accessed using TLS (ITS#3191)



Full_Name: Dan Lowe
Version: 2.0.27
OS: Redhat Enterprise Linux v3.0
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (199.46.199.233)


slapd works fine when not using TLS.  
But as soon as I turn on TLS
slapd crashes every time it is 
accessed and leaves no error messages, 
even with logevel at -1.
I am using openldap version 2.0.27
on an hp rx2600 
ia64 architecture
Running RedHat Enterprise Linux v3.0

I have included the output of an ldapsearch command that
caused slapd to crash. I was running slapd in gdb and I 
have included that output also. Other things that cause 
slapd to crash are 'getent group' and 'su ldapUser'.
I have also included my config files at the bottom.


I have been trying to figure this out for about a week 
and a half with no luck.




******************************
 THE LDAPSEARCH COMMAND 
 (this causes slapd to crash 
 silently, no error messages
 in the log)
******************************

ldapsearch -d-1 -ZZ -h "myhost.domain.com" -D "cn=Manager,o=ORGANIZATION,c=US"
'(uid=dwl)' -w password
ldap_create
ldap_extended_operation_s
ldap_extended_operation
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: myhost.domain.com
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying xxx.xxx.xxx.xxx:389
ldap_connect_timeout: fd: 3 tm: -1 async: 0
ldap_ndelay_on: 3
ldap_is_sock_ready: 3
ldap_ndelay_off: 3
ldap_int_sasl_open: host=myhost.domain.com
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 31 bytes to sd 3
  0000:  30 1d 02 01 01 77 18 80  16 31 2e 33 2e 36 2e 31   0....w...1.3.6.1
  0010:  2e 34 2e 31 2e 31 34 36  36 2e 32 30 30 33 37      .4.1.1466.20037
ldap_write: want=31, written=31
  0000:  30 1d 02 01 01 77 18 80  16 31 2e 33 2e 36 2e 31   0....w...1.3.6.1
  0010:  2e 34 2e 31 2e 31 34 36  36 2e 32 30 30 33 37      .4.1.1466.20037
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: myhost.domain.com  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Thu Jun 17 15:11:34 2004
 
** 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
do_ldap_select
read1msg: msgid 1, all 1
ber_get_next
ldap_read: want=1, got=1
  0000:  30                                                 0
ldap_read: want=1, got=1
  0000:  0c                                                 .
ldap_read: want=12, got=12
  0000:  02 01 01 78 07 0a 01 00  04 00 04 00               ...x........
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x6000000000007a30 ptr=0x6000000000007a30 end=0x6000000000007a3c
len=12
  0000:  02 01 01 78 07 0a 01 00  04 00 04 00               ...x........
ldap_read: message type extended-result msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x6000000000007a30 ptr=0x6000000000007a33 end=0x6000000000007a3c
len=9
  0000:  78 07 0a 01 00 04 00 04  00                        x........
read1msg:  0 new referrals
read1msg:  mark request completed, id = 1
request 1 done
res_errno: 0, res_error: <>, 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_dump: buf=0x6000000000007a30 ptr=0x6000000000007a33 end=0x6000000000007a3c
len=9
  0000:  78 07 0a 01 00 04 00 04  00                        x........
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x6000000000007a30 ptr=0x6000000000007a33 end=0x6000000000007a3c
len=9
  0000:  78 07 0a 01 00 04 00 04  00                        x........
ber_scanf fmt (}) ber:
ber_dump: buf=0x6000000000007a30 ptr=0x6000000000007a3c end=0x6000000000007a3c
len=0
 
ldap_msgfree
TLS trace: SSL_connect:before/connect initialization
tls_write: want=142, written=142
  0000:  80 8c 01 03 01 00 63 00  00 00 20 00 00 39 00 00   ......c... ..9..
  0010:  38 00 00 35 00 00 16 00  00 13 00 00 0a 07 00 c0   8..5............
  0020:  00 00 33 00 00 32 00 00  2f 03 00 80 00 00 66 00   ..3..2../.....f.
  0030:  00 05 00 00 04 01 00 80  08 00 80 00 00 63 00 00   .............c..
  0040:  62 00 00 61 00 00 15 00  00 12 00 00 09 06 00 40   b..a...........@
  0050:  00 00 65 00 00 64 00 00  60 00 00 14 00 00 11 00   ..e..d..`.......
  0060:  00 08 00 00 06 04 00 80  00 00 03 02 00 80 93 92   ................
  0070:  98 68 0c 62 63 80 39 1a  ad 6f 07 4c 30 3e a4 de   .h.bc.9..o.L0>..
  0080:  a2 76 63 0c 28 ff 41 a5  65 16 99 b2 ed 12         .vc.(.A.e.....
TLS trace: SSL_connect:SSLv2/v3 write client hello A
tls_read: want=7, got=7
  0000:  16 03 01 00 4a 02 00                               ....J..
tls_read: want=72, got=72
  0000:  00 46 03 01 40 d1 ec e6  94 b4 2d e3 eb 91 29 eb   .F..@.....-...).
  0010:  ba ed 57 7e b2 fd 4b 6a  76 39 eb f9 b6 75 b8 93   ..W~..Kjv9...u..
  0020:  00 00 00 00 20 26 b5 26  b3 e6 5c a9 80 ee 8e 1b   .... &.&..\.....
  0030:  44 65 ab 09 3d d7 f0 af  e3 f0 de 1e 94 17 f5 97   De..=...........
  0040:  83 db 97 5e 34 00 35 00                            ...^4.5.
TLS trace: SSL_connect:SSLv3 read server hello A
tls_read: want=5, got=5
  0000:  16 03 01 03 87                                     .....
tls_read: want=903, got=903
  0000:  0b 00 03 83 00 03 80 00  03 7d 30 82 03 79 30 82   .........}0..y0.
  0010:  02 e2 a0 03 02 01 02 02  01 01 30 0d 06 09 2a 86   ..........0...*.
  0020:  48 86 f7 0d 01 01 04 05  00 30 7d 31 0b 30 09 06   H........0}1.0..
  0030:  03 55 04 06 13 02 55 53  31 15 30 13 06 03 55 04   .U....US1.0...U.
  0040:  08 13 0c 50 65 6e 6e 73  79 6c 76 61 6e 69 61 31   ...Pennsylvania1
  0050:  16 30 14 06 03 55 04 07  13 0d 53 74 61 74 65 20   .0...U....My Loc
  0060:  43 6f 6c 6c 65 67 65 31  11 30 0f 06 03 55 04 0a   ale1.0...U..
  0070:  13 08 52 61 79 74 68 65  6f 6e 31 11 30 0f 06 03   ..myCompany1.0...
  0080:  55 04 0b 13 08 4c 41 4d  50 57 4f 4f 4c 31 19 30  
U....ORGANIZATION1.0
  0090:  17 06 03 55 04 03 13 10  65 64 69 6e 62 6f 72 6f   ...U....myhost
  00a0:  2e 68 72 62 2e 63 6f 6d  30 1e 17 0d 30 34 30 36   .domain.com0...0406
  00b0:  31 37 31 37 33 37 35 35  5a 17 0d 30 35 30 36 31   17173755Z..05061
  00c0:  37 31 37 33 37 35 35 5a  30 7d 31 0b 30 09 06 03   7173755Z0}1.0...
  00d0:  55 04 06 13 02 55 53 31  15 30 13 06 03 55 04 08   U....US1.0...U..
  00e0:  13 0c 50 65 6e 6e 73 79  6c 76 61 6e 69 61 31 16   ..Pennsylvania1.
  00f0:  30 14 06 03 55 04 07 13  0d 53 74 61 74 65 20 43   0...U....My Loca
  0100:  6f 6c 6c 65 67 65 31 11  30 0f 06 03 55 04 0a 13   le1.0...U...
  0110:  08 52 61 79 74 68 65 6f  6e 31 11 30 0f 06 03 55   .myCompany1.0...U
  0120:  04 0b 13 08 4c 41 4d 50  57 4f 4f 4c 31 19 30 17  
....ORGANIZATION1.0.
  0130:  06 03 55 04 03 13 10 65  64 69 6e 62 6f 72 6f 2e   ..U....myhost.
  0140:  68 72 62 2e 63 6f 6d 30  81 9f 30 0d 06 09 2a 86   domain.com0..0...*.
  0150:  48 86 f7 0d 01 01 01 05  00 03 81 8d 00 30 81 89   H............0..
  0160:  02 81 81 00 a1 3a b1 64  57 81 94 7a b7 a4 6e b4   .....:.dW..z..n.
  0170:  b2 b9 b7 68 08 fa c1 c4  52 05 3e 50 0c 6b 7a 96   ...h....R.>P.kz.
  0180:  e4 db 85 11 37 2d 39 eb  fa 89 ae a6 53 49 3e 25   ....7-9.....SI>%
  0190:  c4 1b a8 bb 9f 6e ed cb  87 1e 7b 63 a3 39 97 b1   .....n....{c.9..
  01a0:  d8 a8 55 56 26 19 6c fd  f4 55 2a de 57 06 71 68   ..UV&.l..U*.W.qh
  01b0:  13 1a 15 e4 1f c7 18 d1  0b 74 df a0 7a 7c 96 3a   .........t..z|.:
  01c0:  a4 d1 55 99 ba 4f c2 29  8a bb a9 71 e0 0d ce ad   ..U..O.)...q....
  01d0:  33 ce e3 c1 0a f1 c3 ad  27 2a db ac ea e4 62 53   3.......'*....bS
  01e0:  bf 3a 0f cd 02 03 01 00  01 a3 82 01 07 30 82 01   .:...........0..
  01f0:  03 30 09 06 03 55 1d 13  04 02 30 00 30 2c 06 09   .0...U....0.0,..
  0200:  60 86 48 01 86 f8 42 01  0d 04 1f 16 1d 4f 70 65   `.H...B......Ope
  0210:  6e 53 53 4c 20 47 65 6e  65 72 61 74 65 64 20 43   nSSL Generated C
  0220:  65 72 74 69 66 69 63 61  74 65 30 1d 06 03 55 1d   ertificate0...U.
  0230:  0e 04 16 04 14 ac 71 b8  5c 4a b8 bb 7b 35 0c 66   ......q.\J..{5.f
  0240:  2e de f0 d6 27 1f 37 a0  8f 30 81 a8 06 03 55 1d   ....'.7..0....U.
  0250:  23 04 81 a0 30 81 9d 80  14 29 79 52 7a 6f 71 dc   #...0....)yRzoq.
  0260:  20 7d a3 0d ff 3c 3c d4  58 4b 9c 6e 09 a1 81 81    }...<<.XK.n....
  0270:  a4 7f 30 7d 31 0b 30 09  06 03 55 04 06 13 02 55   ..0}1.0...U....U
  0280:  53 31 15 30 13 06 03 55  04 08 13 0c 50 65 6e 6e   S1.0...U....Penn
  0290:  73 79 6c 76 61 6e 69 61  31 16 30 14 06 03 55 04   sylvania1.0...U.
  02a0:  07 13 0d 53 74 61 74 65  20 43 6f 6c 6c 65 67 65   ...My Locale
  02b0:  31 11 30 0f 06 03 55 04  0a 13 08 52 61 79 74 68   1.0...U....myCom
  02c0:  65 6f 6e 31 11 30 0f 06  03 55 04 0b 13 08 4c 41   pany1.0...U....OR
  02d0:  4d 50 57 4f 4f 4c 31 19  30 17 06 03 55 04 03 13  
GANIZATION1.0...U...
  02e0:  10 65 64 69 6e 62 6f 72  6f 2e 68 72 62 2e 63 6f   .myhost.domain.co
  02f0:  6d 82 01 00 30 0d 06 09  2a 86 48 86 f7 0d 01 01   m...0...*.H.....
  0300:  04 05 00 03 81 81 00 b1  b5 58 1d d9 3a ed 41 c1   .........X..:.A.
  0310:  85 f0 ee 46 0e b3 35 2b  6e 3d f9 91 6d eb db 56   ...F..5+n=..m..V
  0320:  be ff 67 9e 37 00 f4 a9  e4 04 bf 6c 94 69 f6 2e   ..g.7......l.i..
  0330:  36 a5 eb fd c6 dc 6d b1  10 ec c7 a2 1d e8 75 9d   6.....m.......u.
  0340:  50 6a 1d 75 23 fb 17 db  27 d5 40 d9 bf 11 bc 92   Pj.u#...'.@.....
  0350:  76 2a a2 c6 ee a0 f4 6c  01 ce 8d 2b 76 32 14 57   v*.....l...+v2.W
  0360:  c1 7e 4a db a4 68 4d 28  83 38 9f e4 b4 ce 3d d1   .~J..hM(.8....=.
  0370:  61 19 ad c4 23 ba 21 d5  5a 2d fd 36 50 ea ad 91   a...#.!.Z-.6P...
  0380:  60 ef f1 77 db c5 5c                               `..w..\
TLS certificate verification: depth: 1, subject: /C=US/ST=Pennsylvania/L=My
Locale/O=myCompany/OU=ORGANIZATION/CN=myhost.domain.com, issuer:
/C=US/ST=Pennsylvania/L=My
Locale/O=myCompany/OU=ORGANIZATION/CN=myhost.domain.com
TLS certificate verification: depth: 0, subject: /C=US/ST=Pennsylvania/L=My
Locale/O=myCompany/OU=ORGANIZATION/CN=myhost.domain.com, issuer:
/C=US/ST=Pennsylvania/L=My
Locale/O=myCompany/OU=ORGANIZATION/CN=myhost.domain.com
TLS trace: SSL_connect:SSLv3 read server certificate A
tls_read: want=5, got=5
  0000:  16 03 01 00 04                                     .....
tls_read: want=4, got=4
  0000:  0e 00 00 00                                        ....
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_write: want=198, written=198
  0000:  16 03 01 00 86 10 00 00  82 00 80 97 62 aa e1 e6   ............b...
  0010:  05 51 c7 3c 4f b4 f6 09  75 ee 76 71 12 f8 61 bb   .Q.<O...u.vq..a.
  0020:  11 bb 76 a2 ef f9 f3 d5  38 95 18 9a ac 0b 88 0c   ..v.....8.......
  0030:  f3 78 7c 1c 9f ca f4 ec  2a 4d 6f 04 c9 f1 0c 7d   .x|.....*Mo....}
  0040:  f4 21 4a c2 d6 91 24 6c  b1 2b ff e2 6a 3c 17 ff   .!J...$l.+..j<..
  0050:  75 47 ea a9 a0 e9 4d f8  29 21 aa 4b f9 71 ce 46   uG....M.)!.K.q.F
  0060:  14 ad 06 1c ee 19 8a 95  c4 53 87 e2 e6 87 ee 57   .........S.....W
  0070:  f7 38 01 6c ec 4c 9e d5  30 38 01 0d 39 4c 6d c2   .8.l.L..08..9Lm.
  0080:  18 14 73 1f 75 50 9e 7a  61 31 c6 14 03 01 00 01   ..s.uP.za1......
  0090:  01 16 03 01 00 30 06 c2  a1 a3 eb 42 19 df 79 f1   .....0.....B..y.
  00a0:  9b c8 02 43 27 2b c1 2d  72 6e 2b 65 50 2f f7 ef   ...C'+.-rn+eP/..
  00b0:  a8 cb be d5 82 fc f7 30  25 e9 01 03 f3 53 58 17   .......0%....SX.
  00c0:  fd c8 15 dc 6d 17                                  ....m.
TLS trace: SSL_connect:SSLv3 flush data
tls_read: want=5, got=5
  0000:  14 03 01 00 01                                     .....
tls_read: want=1, got=1
  0000:  01                                                 .
tls_read: want=5, got=5
  0000:  16 03 01 00 30                                     ....0
tls_read: want=48, got=48
  0000:  c0 28 f5 f4 d1 0d eb 6d  f9 0d 26 f9 5a 2d ff 38   .(.....m..&.Z-.8
  0010:  b6 aa 5b 0f b1 91 63 f3  0f 47 66 21 ee 28 92 1c   ..[...c..Gf!.(..
  0020:  40 0a 4c a6 99 28 f8 7c  32 14 5d 54 27 48 47 75   @.L..(.|2.]T'HGu
TLS trace: SSL_connect:SSLv3 read finished A
ldap_pvt_sasl_getmech
ldap_search
put_filter "(objectclass=*)"
put_filter: simple
put_simple_filter "objectclass=*"
ldap_send_initial_request
ldap_send_server_request
ber_flush: 64 bytes to sd 3
  0000:  30 3e 02 01 02 63 39 04  00 0a 01 00 0a 01 00 02   0>...c9.........
  0010:  01 00 02 01 00 01 01 00  87 0b 6f 62 6a 65 63 74   ..........object
  0020:  63 6c 61 73 73 30 19 04  17 73 75 70 70 6f 72 74   class0...support
  0030:  65 64 53 41 53 4c 4d 65  63 68 61 6e 69 73 6d 73   edSASLMechanisms
tls_write: want=138, written=138
  0000:  17 03 01 00 20 af 9f 11  89 37 fe f3 f2 5a 78 d9   .... ....7...Zx.
  0010:  21 4f cf 43 00 3b db 5c  a7 25 ef b4 ef d7 31 15   !O.C.;.\.%....1.
  0020:  a0 4c 45 96 7d 17 03 01  00 60 50 bd 5b 42 b9 86   .LE.}....`P.[B..
  0030:  11 65 e2 b5 49 b8 38 e7  56 83 9c 1a 89 b1 8f ad   .e..I.8.V.......
  0040:  77 d1 6b 45 b1 e1 7c 1c  be 67 2d 2a d0 21 34 59   w.kE..|..g-*.!4Y
  0050:  2d 94 0a cf 36 86 d5 65  bc 53 59 e8 dc 70 0e ab   -...6..e.SY..p..
  0060:  62 9a d6 a7 9e dd 24 d4  ba 0d d0 76 45 2b 60 c1   b.....$....vE+`.
  0070:  0f 80 b9 f4 57 4b b1 e7  8e 75 f7 1a cd 35 aa 16   ....WK...u...5..
  0080:  58 9d ae 7a 9b 32 7b 7f  a9 89                     X..z.2{...
ldap_write: want=64, written=64
  0000:  30 3e 02 01 02 63 39 04  00 0a 01 00 0a 01 00 02   0>...c9.........
  0010:  01 00 02 01 00 01 01 00  87 0b 6f 62 6a 65 63 74   ..........object
  0020:  63 6c 61 73 73 30 19 04  17 73 75 70 70 6f 72 74   class0...support
  0030:  65 64 53 41 53 4c 4d 65  63 68 61 6e 69 73 6d 73   edSASLMechanisms
ldap_result msgid 2
ldap_chkResponseList for msgid=2, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 2
wait4msg continue, msgid 2, all 1
** Connections:
* host: myhost.domain.com  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Thu Jun 17 15:11:34 2004
 
** Outstanding Requests:
 * msgid 2,  origid 2, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
ldap_chkResponseList for msgid=2, all=1
ldap_chkResponseList returns NULL
do_ldap_select
read1msg: msgid 2, all 1
ber_get_next
tls_read: want=5 error=Connection reset by peer
ldap_read: want=1 error=Connection reset by peer
ber_get_next failed.
ldap_perror
ldap_sasl_interactive_bind_s: Can't contact LDAP server











*************************
  THE GDB OUTPUT
*************************
[]# gdb /usr/sbin/slapd
GNU gdb Red Hat Linux (5.3.90-0.20030710.40rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ia64-redhat-linux-gnu"...(no debugging symbols
found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".
 
(gdb) run -d 0 -u ldap -h "ldap:/// ldaps:///"
Starting program: /usr/sbin/slapd -d 0 -u ldap -h "ldap:/// ldaps:///"
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...[Thread debugging
using libthread_db enabled]
[New Thread 2305843009222057552 (LWP 7099)]
(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...[New Thread 2305843009231304912 (LWP 7106)]
[New Thread 2305843009233402064 (LWP 7108)]
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2305843009231304912 (LWP 7106)]
0x20000000001d8881 in SSL_get_current_cipher () from /lib/libssl.so.4
(gdb) bt full
#0  0x20000000001d8881 in SSL_get_current_cipher () from /lib/libssl.so.4
No symbol table info available.
#1  0x400000000016d0e0 in ldap_pvt_tls_get_strength ()
No symbol table info available.
#2  0x4000000000034570 in connection_read ()
No symbol table info available.
#3  0x400000000002d4a0 in slapd_daemon_destroy ()
No symbol table info available.
#4  0x400000000016d0e0 in ldap_pvt_tls_get_strength ()
No symbol table info available.
(gdb) quit





****************************
/etc/openldap/ldap.conf file
****************************
# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.4.8.6 2000/09/05 17:54:38
kurt Exp $
#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

#BASE	dc=example, dc=com
#URI	ldap://ldap.example.com ldap://ldap-master.example.com:666

#SIZELIMIT	12
#TIMELIMIT	15
#DEREF		never
HOST myhost.domain.com
BASE o=ORGANIZATION,c=US
TLS_CACERT /usr/share/ssl/certs/slapd/cacert.pem
TLS_CACERTDIR /usr/share/ssl/certs/slapd
TLS_REQCERT demand
















****************************
/etc/openldap/slapd.conf file
****************************
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 2001/09/27 20:00:31
kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#

loglevel	-1

include		/etc/openldap/schema/core.schema
include		/etc/openldap/schema/cosine.schema
include		/etc/openldap/schema/inetorgperson.schema
include		/etc/openldap/schema/nis.schema
include		/etc/openldap/schema/redhat/autofs.schema
include		/etc/openldap/schema/redhat/kerberosobject.schema

# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral	ldap://root.openldap.org

#pidfile	//var/run/slapd.pid
#argsfile	//var/run/slapd.args

# Create a replication log in /var/lib/ldap for use by slurpd.
#replogfile	/var/lib/ldap/master-slapd.replog

# Load dynamic backend modules:
# modulepath	/usr/sbin/openldap
# moduleload	back_ldap.la
# moduleload	back_ldbm.la
# moduleload	back_passwd.la
# moduleload	back_shell.la

#
# The next three lines allow use of TLS for connections using a dummy test
# certificate, but you should generate a proper certificate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it.
TLSCipherSuite	HIGH:MEDIUM:+SSLv2 
TLSCertificateFile /usr/share/ssl/certs/slapd/servercrt.pem
TLSCertificateKeyFile /usr/share/ssl/certs/slapd/serverkey.pem
TLSCACertificateFile /usr/share/ssl/certs/slapd/cacert.pem
TLSVerifyClient demand
#
# Sample Access Control
#	Allow read access of root DSE
#	Allow self write access
#	Allow authenticated users read access
#	Allow anonymous users to authenticate
#
#access to dn="" by * read
#access to *
#	by self write
#	by users read
#	by anonymous auth
#
# if no access controls are present, the default is:
#	Allow read by all
#
# rootdn can always write!

#######################################################################
# ldbm database definitions
#######################################################################

database	ldbm
#suffix		"dc=my-domain,dc=com"
suffix		"o=ORGANIZATION,c=US"
#rootdn		"cn=Manager,dc=my-domain,dc=com"
rootdn		"cn=Manager,o=ORGANIZATION,c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoided.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw		secret
rootpw		{MD5}+9g+VaPqFmegFO07jX65Lw==
# The database directory MUST exist prior to running slapd AND 
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory	/var/lib/ldap
# Indices to maintain
index	objectClass,uid,uidNumber,gidNumber,memberUid	eq
index	cn,mail,surname,givenname			eq,subinitial
# Replicas to which we should propagate changes
#replica host=ldap-1.example.com:389 tls=yes
#	bindmethod=sasl saslmech=GSSAPI
#	authcId=host/ldap-master.example.com@EXAMPLE.COM



























****************************
/etc/ldap.conf file
****************************
# @(#)$Id: ldap.conf,v 1.27 2003/01/17 21:37:12 lukeh Exp $
#
# This is the configuration file for the LDAP nameservice
# switch library and the LDAP PAM module.
#
# PADL Software
# http://www.padl.com
#

# Your LDAP server. Must be resolvable without using LDAP.
# Multiple hosts may be specified, each separated by a 
# space. How long nss_ldap takes to failover depends on
# whether your LDAP client library supports configurable
# network or connect timeouts (see bind_timelimit).
host myhost.domain.com

# The distinguished name of the search base.
base o=ORGANIZATION,c=US

# Another way to specify your LDAP server is to provide an
# uri with the server name. This allows to use
# Unix Domain Sockets to connect to a local LDAP Server.
#uri ldap://127.0.0.1/
#uri ldaps://127.0.0.1/   
#uri ldapi://%2fvar%2frun%2fldapi_sock/
# Note: %2f encodes the '/' used as directory separator

# The LDAP version to use (defaults to 3
# if supported by client library)
#ldap_version 3

# The distinguished name to bind to the server with.
# Optional: default is to bind anonymously.
#binddn cn=proxyuser,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,o=ORGANIZATION,c=US

# 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=posixAccount

# 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=example,dc=com

# Group member attribute
pam_member_attribute gid

# 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

# HEADS UP: the pam_crypt, pam_nds_passwd,
# and pam_ad_passwd options are no
# longer supported.

# 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 crypt

# 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 md5

# 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,o=ORGANIZATION,c=US?sub
nss_base_shadow		ou=People,o=ORGANIZATION,c=US?sub
nss_base_group		ou=Group,o=ORGANIZATION,c=US?sub
#nss_base_hosts		ou=Hosts,dc=example,dc=com?one
#nss_base_services	ou=Services,dc=example,dc=com?one
#nss_base_networks	ou=Networks,dc=example,dc=com?one
#nss_base_protocols	ou=Protocols,dc=example,dc=com?one
#nss_base_rpc		ou=Rpc,dc=example,dc=com?one
#nss_base_ethers	ou=Ethers,dc=example,dc=com?one
#nss_base_netmasks	ou=Networks,dc=example,dc=com?ne
#nss_base_bootparams	ou=Ethers,dc=example,dc=com?one
#nss_base_aliases	ou=Aliases,dc=example,dc=com?one
#nss_base_netgroup	ou=Netgroup,dc=example,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
#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 /usr/share/ssl/certs/slapd/cacert.pem
tls_cacertdir /usr/share/ssl/certs/slapd

# Seed the PRNG if /dev/urandom is not provided
#tls_randfile /var/run/egd-pool

# SSL cipher suite
# See man ciphers for syntax
tls_ciphers HIGH:MEDIUM:+SSLv2

# Client certificate and key
# Use these, if your server requires client authentication.
tls_cert /usr/share/ssl/certs/slapd/servercrt.pem
tls_key /usr/share/ssl/certs/slapd/serverkey.pem