summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install/ipa-client-install
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-01-31 22:44:20 -0500
committerRob Crittenden <rcritten@redhat.com>2012-03-14 21:28:52 -0400
commit14975cdcddab5f757502ef7736e93a965ce1f207 (patch)
tree1c587e43192f15e74938371576979d657c85ca94 /ipa-client/ipa-install/ipa-client-install
parent97e440bf4b4da2add771cfa4db1614668a5cd06c (diff)
downloadfreeipa-14975cdcddab5f757502ef7736e93a965ce1f207.tar.gz
freeipa-14975cdcddab5f757502ef7736e93a965ce1f207.tar.xz
freeipa-14975cdcddab5f757502ef7736e93a965ce1f207.zip
Configure a basic ldap.conf for OpenLDAP in /etc/openldap/ldap.conf
Set URI, BASE and TLS_CACERT Also update the man page to include a list of files that the client changes. https://fedorahosted.org/freeipa/ticket/1810
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install19
1 files changed, 19 insertions, 0 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 604283ae4..b7753f544 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -547,6 +547,22 @@ def configure_nslcd_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server,
return (0, 'NSLCD', ', '.join(files))
+def configure_openldap_conf(fstore, cli_basedn, cli_server):
+ ldapconf = ipaclient.ipachangeconf.IPAChangeConf("IPA Installer")
+ ldapconf.setOptionAssignment(" ")
+
+ opts = [{'name':'comment', 'type':'comment', 'value':'File modified by ipa-client-install'},
+ {'name':'empty', 'type':'empty'},
+ {'name':'URI', 'type':'option', 'value':'ldaps://'+ cli_server},
+ {'name':'BASE', 'type':'option', 'value':cli_basedn},
+ {'name':'TLS_CACERT', 'type':'option', 'value':'/etc/ipa/ca.crt'},
+ {'name':'empty', 'type':'empty'}]
+
+ target_fname = '/etc/openldap/ldap.conf'
+ fstore.backup_file(target_fname)
+ ldapconf.newConf(target_fname, opts)
+ os.chmod(target_fname, 0644)
+
def hardcode_ldap_server(cli_server):
"""
DNS Discovery didn't return a valid IPA server, hardcode a value into
@@ -1451,6 +1467,9 @@ def install(options, env, fstore, statestore):
if conf:
print "%s configured using configuration file(s) %s" % (conf, filename)
+ configure_openldap_conf(fstore, cli_basedn, cli_server)
+ print "Configured /etc/openldap/ldap.conf"
+
#Check that nss is working properly
if not options.on_master:
n = 0