diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-01-31 22:44:20 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-03-14 21:28:52 -0400 |
commit | 14975cdcddab5f757502ef7736e93a965ce1f207 (patch) | |
tree | 1c587e43192f15e74938371576979d657c85ca94 /ipa-client/ipa-install/ipa-client-install | |
parent | 97e440bf4b4da2add771cfa4db1614668a5cd06c (diff) | |
download | freeipa-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-x | ipa-client/ipa-install/ipa-client-install | 19 |
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 |