Skip to content

Commit

Permalink
[COOK-3699] Add pptions for different OUs and TLS and password mechan…
Browse files Browse the repository at this point in the history
…isms

Signed-off-by: Seth Vargo <sethvargo@gmail.com>
  • Loading branch information
Martin Meredith authored and sethvargo committed Oct 7, 2013
1 parent edd2400 commit 028e905
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
9 changes: 9 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@

default['openldap']['basedn'] = "dc=localdomain"
default['openldap']['server'] = "ldap.localdomain"
default['openldap']['tls_enabled'] = true
default['openldap']['password_mechanism'] = 'md5'

default['openldap']['passwd_ou'] = 'people'
default['openldap']['shadow_ou'] = 'people'
default['openldap']['group_ou'] = 'groups'
default['openldap']['automount_ou'] = 'automount'



if node['domain'].length > 0
default['openldap']['basedn'] = "dc=#{node['domain'].split('.').join(",dc=")}"
Expand Down
12 changes: 7 additions & 5 deletions templates/default/ldap.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ ldap_version 3
# Where to find data
base <%= node['openldap']['basedn'] %>
scope sub
nss_base_passwd ou=people,<%= node['openldap']['basedn'] %>
nss_base_shadow ou=people,<%= node['openldap']['basedn'] %>
nss_base_group ou=group,<%= node['openldap']['basedn'] %>
nss_base_automount ou=automount,<%= node['openldap']['basedn'] %>
nss_base_passwd ou=<%= node['openldap']['passwd_ou'] %>,<%= node['openldap']['basedn'] %>
nss_base_shadow ou=<%= node['openldap']['shadow_ou'] %>,<%= node['openldap']['basedn'] %>
nss_base_group ou=<%= node['openldap']['group_ou'] %>,<%= node['openldap']['basedn'] %>
nss_base_automount ou=<%= node['openldap']['automount_oi'] %>,<%= node['openldap']['basedn'] %>
<% if node['openldap']['tls_enabled'] %>
# TLS Options
ssl start_tls
tls_checkpeer no
<% end %>

# Password options
pam_password md5
pam_password <%= node['openldap']['password_mechanism'] %>

0 comments on commit 028e905

Please sign in to comment.