<div>Thanks Rick. </div>
<div> </div>
<div>I do not have access to systems now. I will do the suggested changes on monday once I have access.</div>
<div> </div>
<div> </div>
<div>Regards,</div>
<div>-Nilesh<br><br></div>
<div class="gmail_quote">On Fri, Aug 14, 2009 at 5:07 PM, Rick Stevens <span dir="ltr"><<a href="mailto:ricks@nerd.com">ricks@nerd.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">This is really aimed at Nilesh, but the rest of the list may be<br>interested.<br><br>I attach a full-up TLS/SSL slapd.conf file.  This is taken from the<br>
servers we use here, cleaned up and sanitized.  Our servers are OpenLDAP 2.4.16, but the same basic stuff should work.  I include comments about<br>some things so that, with a bit of tweaking regarding the "authz-regexp"<br>
stuff, turning off "starttls=yes" in the syncrepl items, using a<br>cleartext password hash and such, it can be used for both TLS/SSL or<br>SASL systems.<br><br>I hope this helps folk in the future.<br><br>#----------------- CUT HERE -------------------------------------------<br>
#<br># slapd.conf file for TLS/SSL configurations.  Easily modified for use<br># with SASL configurations.<br># Author:       Rick Stevens, HCI/C2, Inc.<br># Last Edit:    1 August 2009<br>#<br># See slapd.conf(5) for details on configuration options.<br>
# This file should NOT be world readable.<br>#<br>include         /usr/local/etc/openldap/schema/core.schema<br>include         /usr/local/etc/openldap/schema/cosine.schema<br>include         /usr/local/etc/openldap/schema/inetorgperson.schema<br>
include         /usr/local/etc/openldap/schema/nis.schema<br>include         /usr/local/etc/openldap/schema/misc.schema<br># Include stuff for the ppolicy mechanism...<br>include         /usr/local/etc/openldap/schema/ppolicy.schema<br>
# Include stuff for LDAP control of sudo...<br>include         /usr/local/etc/openldap/schema/sudo.schema<br># Include stuff for LDAP-based SSH public keys (requires a hack to sshd)<br>#include                /usr/local/etc/openldap/schema/openssh-lpk_openldap.schema<br>
<br># DEBUGGING LOG LEVELS<br>#loglevel 256 128 32 4 1<br>loglevel 128<br><br># Do not enable referrals until AFTER you have a working directory<br># service AND an understanding of referrals.<br>#referral       ldap://<a href="http://root.openldap.org/" target="_blank">root.openldap.org</a> 
<div class="im"><br><br>pidfile         /usr/var/run/slapd.pid<br>#argsfile       /usr/var/run/slapd.args<br><br></div># Load dynamic backend modules:<br>modulepath      /usr/lib64/openldap<br>moduleload      <a href="http://accesslog.la/" target="_blank">accesslog.la</a><br>
moduleload      <a href="http://auditlog.la/" target="_blank">auditlog.la</a><br>moduleload      <a href="http://dyngroup.la/" target="_blank">dyngroup.la</a><br>moduleload      <a href="http://pcache.la/" target="_blank">pcache.la</a><br>
moduleload      <a href="http://ppolicy.la/" target="_blank">ppolicy.la</a><br>moduleload      <a href="http://refint.la/" target="_blank">refint.la</a><br>moduleload      <a href="http://retcode.la/" target="_blank">retcode.la</a><br>
moduleload      <a href="http://rwm.la/" target="_blank">rwm.la</a><br>moduleload      <a href="http://syncprov.la/" target="_blank">syncprov.la</a><br>moduleload      <a href="http://translucent.la/" target="_blank">translucent.la</a><br>
moduleload      <a href="http://unique.la/" target="_blank">unique.la</a><br>moduleload      <a href="http://valsort.la/" target="_blank">valsort.la</a><br><br># Password Requirements<br>#  For SASL, this MUST be in cleartext...<br>
#password-hash {CLEARTEXT}<br>#  Note that our specifications in both the ppolicy overlay and password<br>#  checking library can only check the bits of the password after the<br>#  cipher encryption.  This makes SSHA unusable as it doesn't<br>
#  necessarily generate any "special" (punctuation) characters, so we<br>#  have to use MD5 encryption.  Ain't that a kick in the head?<br>password-hash {MD5}<br><br># Authentication<br>#  SASL will look up DIGEST-MD5 stuff in the LDAP database using these<br>
#  regex mappings.  Note that under SSL, we do NOT use these!<br>#    First, handle people who use a DN of "uid="...<br>#authz-regexp<br>#        uid=([^,]*),cn=[^,]*,cn=auth<br>#        uid=$1,ou=people,dc=ourcompany,dc=com<br>
<br>#    Also handle people who use a DN of "cn="...<br>#authz-regexp<br>#        cn=([^,]*),cn=[^,]*,cn=auth<br>#        uid=sysman,ou=People,dc=ourcompany,dc=com<br><br># Security restrictions<br>#       Require integrity protection (prevent hijacking)<br>
#       Require 112-bit (3DES or better) encryption for updates<br>#       Require 128-bit (SSL) encryption for simple bind<br>security ssf=1 update_ssf=112 simple_bind=128<br><br>#######################################################################<br>
# ACL specifications for pam_ldap and syncrepl...<br>#######################################################################<br>#  Replication and God-like user ACL<br>#    These users get full write access, primarily because a) gods must<br>
#    be able to do anything; and b) we use mirror mode meaning that<br>#    other servers have to be able to update our database.<br>access to *<br>   by dn="uid=sysman,ou=People,dc=ourcompany,dc=com" tls_ssf=128 write<br>
   by dn="cn=manager,dc=ourcompany,dc=com" tls_ssf=128 write<br>   by * break<br><br>#  Authentication ACL<br>#    Anonymous users can authenticate only<br>#    Authenticated users can modify their userPassword and<br>
#    shadowLastChange.  No other access permitted.<br>access to attrs=userPassword,shadowLastChange 
<div class="im"><br>   by anonymous auth<br>   by self write<br>   by * none<br><br></div>#######################################################################<br># TLS/SSL Configuration<br>#######################################################################<br>
TLSCACertificateFile    /etc/openldap/cacerts/ourcompany-cacert.pem<br>TLSCertificateFile      /etc/openldap/cacerts/thisserver-cert.pem<br>TLSCertificateKeyFile   /etc/openldap/cacerts/thisserver-key.pem<br><br>#######################################################################<br>
# BDB database definitions<br>#######################################################################<br>database        bdb<br>suffix          "dc=ourcompany,dc=com"<br>rootdn          "cn=Manager,dc=ourcompany,dc=com"<br>
# Cleartext passwords, especially for the rootdn, should<br># be avoided.  See slappasswd(8) and slapd.conf(5) for details.<br># Use of strong authentication encouraged.<br>#<br># NOTE: See note above the "password-hash" option for the reason we use<br>
# MD5 instead of something harder to crack (like SSHA).<br>#rootpw          Th1sis0urP@$$w0rD!<br>rootpw          {MD5}OhIMKkO7reCpMM3ZPwcvqQ==<br><br># The database directory MUST exist prior to running slapd AND<br># should only be accessible by the slapd and slap tools.<br>
# Mode 700 recommended. 
<div class="im"><br>directory       /usr/var/openldap-data<br><br></div># Indices to maintain for this database...<br>#    NOTE: the entryUUID index is to speed up syncrepl<br>index objectClass                       eq,pres<br>
index ou,cn,mail,surname,givenname      eq,pres,sub<br>index uidNumber,gidNumber,loginShell    eq,pres<br>index uid,memberUid                     eq,pres,sub<br>index nisMapName,nisMapEntry            eq,pres,sub<br>index entryUUID                         eq<br>
<br># syncrepl replicas of this database...<br>#    We will set up ldap1 and ldap2 as "mirror-mirror" or a hot-standby<br>#    configuration.<br>#<br>#    The basic replication is via the "syncprov" overlay using these<br>
#    criteria:<br>#    1) Checkpoint every 10 write operations or 1 minute, whichever is<br>#    first.<br>#    2) Checkpoint the session log every 100 operations<br>overlay syncprov<br>syncprov-checkpoint 10 1<br>syncprov-sessionlog 100<br>
<br>#    Here are the syncrepl configs.  "rid 001" pulls from the main<br>#    server, "rid 002" pulls from the secondary server, "rid 003" pulls<br>#    from the remote server.  Note that it's OK to use cleartext<br>
#    credentials here as everything's encrypted by SSL first (the<br>#    "starttls=yes" option).<br>syncrepl rid=001<br>       provider=ldap://<a href="http://192.168.1.53/" target="_blank">192.168.1.53</a><br>
       type=refreshAndPersist<br>       retry="60 +"<br>       searchbase="dc=ourcompany,dc=com"<br>       scope=sub<br>       schemachecking=on<br>       starttls=yes<br>       bindmethod=simple<br>       binddn="uid=sysman,ou=People,dc=ourcompany,dc=com"<br>
       credentials=Th1sis0urP@$$w0rD!<br><br>syncrepl rid=002<br>       provider=ldap://<a href="http://192.168.1.10/" target="_blank">192.168.1.10</a><br>       type=refreshAndPersist<br>       retry="60 +"<br>
       searchbase="dc=ourcompany,dc=com"<br>       scope=sub<br>       schemachecking=on<br>       starttls=yes<br>       bindmethod=simple<br>       binddn="uid=sysman,ou=People,dc=ourcompany,dc=com"<br>
       credentials=Th1sis0urP@$$w0rD!<br><br>syncrepl rid=003<br>       provider=ldap://<a href="http://192.168.1.11/" target="_blank">192.168.1.11</a><br>       type=refreshAndPersist<br>       retry="60 +"<br>
       searchbase="dc=ourcompany,dc=com"<br>       scope=sub<br>       schemachecking=on<br>       starttls=yes<br>       bindmethod=simple<br>       binddn="uid=sysman,ou=People,dc=ourcompany,dc=com"<br>
       credentials=Th1sis0urP@$$w0rD!<br><br>#    Turn on mirror mode and set the server ID (we're the primary<br>#    server)...<br>mirrormode on<br>serverID 1<br><br># Password policy enforcement...<br>#    Set up password policies via the "ppolicy" overlay.<br>
#    Unless otherwise specified by a "pwdPolicySubentry" attribute<br>#    in a user's entry, they will use the policy defined in the<br>#    "ppolicy_default" entry here.<br>#    We force "Invalid Credentials" errors on locked accounts and<br>
#    we store the passwords in LDAP in MD5 hashes.  Note that the<br>#    "ppolicy_hash_cleartext" does NOT mean "save passwords in<br>#    cleartext".  It means "hash any cleartext passwords BEFORE sending<br>
#    them to the clients.<br>overlay ppolicy<br>ppolicy_default "cn=DefaultPassword,ou=Policies,dc=ourcompany,dc=com"<br>ppolicy_use_lockout<br>ppolicy_hash_cleartext<br><br>#######################################################################<br>
# Monitoring and configuration database definitions<br>#######################################################################<br># Monitor database...<br>database monitor<br>rootdn          "cn=Manager,cn=Monitor"<br>
rootpw          Th1sis0urP@$$w0rD!<br><br># Config database...<br>database config<br>rootdn          "cn=Manager,cn=Config"<br>rootpw          Th1sis0urP@$$w0rD!<br>#----------------- CUT HERE ------------------------------------------- 
<div class="im"><br><br><br>----------------------------------------------------------------------<br>- Rick Stevens, Systems Engineer                      <a href="mailto:ricks@nerd.com" target="_blank">ricks@nerd.com</a> -<br>
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -<br>-                                                                    -<br></div>-  Time: Nature's way of keeping everything from happening at once.  - 
<div>
<div></div>
<div class="h5"><br>----------------------------------------------------------------------<br><br>_______________________________________________<br>Redhat-install-list mailing list<br><a href="mailto:Redhat-install-list@redhat.com" target="_blank">Redhat-install-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/redhat-install-list" target="_blank">https://www.redhat.com/mailman/listinfo/redhat-install-list</a><br>To Unsubscribe Go To ABOVE URL or send a message to:<br><a href="mailto:redhat-install-list-request@redhat.com" target="_blank">redhat-install-list-request@redhat.com</a><br>
Subject: unsubscribe<br></div></div></blockquote></div><br>