def uninstall_sssd(args): app.print_verbose("Uninstall sssd script-version: %d" % SCRIPT_VERSION) x("yum -y remove openldap-clients sssd") x("rm -rf /var/lib/sss/") iptables.del_ldap_chain() iptables.save() version_obj = version.Version("InstallSssd", SCRIPT_VERSION) version_obj.mark_uninstalled()
def uninstall_openldap(args): ''' Uninstall openldap. ''' app.print_verbose("Uninstall openldap script-version: %d" % SCRIPT_VERSION) x("service slapd stop") x("yum -y remove openldap-servers openldap-clients") x("rm -f /etc/openldap/cacerts/*") x("rm -rf /etc/openldap/schema") x("rm -f /etc/openldap/slapd.conf.bak") x("rm -rf /etc/openldap/slapd.d") x("rm -rf /var/lib/ldap") # Remove client cert configs scOpen("/etc/profile").remove( "^LDAPTLS_CERT.*\|^LDAPTLS_KEY.*\|export LDAPTLS_CERT LDAPTLS_KEY.*" ) # Remove sudo configs. scOpen("/etc/nsswitch.conf").remove("^sudoers.*") scOpen("/etc/ldap.conf").remove( "^sudoers_base.*\|^binddn.*\|^bindpw.*\|^ssl on.*\|^tls_cert.*\|^tls_key.*\|sudoers_debug.*" ) # Host information scOpen("/etc/hosts").remove('^' + config.general.get_ldap_server_ip() + ".*") # Remove web files x("rm -rf /var/www/ldap") x("rm -f /etc/httpd/conf.d/010-ldap.conf") x("rm -rf /var/log/slapd") iptables.del_ldap_chain() iptables.save() version_obj = version.Version("InstallOpenLdap", SCRIPT_VERSION) version_obj.mark_uninstalled()
def uninstall_openldap(args): ''' Uninstall openldap. ''' app.print_verbose("Uninstall openldap script-version: %d" % SCRIPT_VERSION) x("service slapd stop") x("yum -y remove openldap-servers openldap-clients") x("rm -f /etc/openldap/cacerts/*") x("rm -rf /etc/openldap/schema") x("rm -f /etc/openldap/slapd.conf.bak") x("rm -rf /etc/openldap/slapd.d") x("rm -rf /var/lib/ldap") # Remove client cert configs scOpen("/etc/profile").remove( "^LDAPTLS_CERT.*\|^LDAPTLS_KEY.*\|export LDAPTLS_CERT LDAPTLS_KEY.*") # Remove sudo configs. scOpen("/etc/nsswitch.conf").remove("^sudoers.*") scOpen("/etc/ldap.conf").remove( "^sudoers_base.*\|^binddn.*\|^bindpw.*\|^ssl on.*\|^tls_cert.*\|^tls_key.*\|sudoers_debug.*" ) # Host information scOpen("/etc/hosts").remove('^' + config.general.get_ldap_server_ip() + ".*") # Remove web files x("rm -rf /var/www/ldap") x("rm -f /etc/httpd/conf.d/010-ldap.conf") x("rm -rf /var/log/slapd") iptables.del_ldap_chain() iptables.save() version_obj = version.Version("InstallOpenLdap", SCRIPT_VERSION) version_obj.mark_uninstalled()