Differences
This shows you the differences between two versions of the page.
linux_wiki:freeipa_migrate_rollback_to_ldap [2016/11/26 23:25] billdozor created |
linux_wiki:freeipa_migrate_rollback_to_ldap [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== FreeIPA Migrate Rollback To LDAP ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Rollback IPA settings and restore LDAP with NSCD/ | ||
- | |||
- | **Checklist** | ||
- | * Requirement 1 | ||
- | |||
- | ---- | ||
- | |||
- | ====== The Script ====== | ||
- | |||
- | Run this script on a client that needs to rollback an IPA migration. | ||
- | |||
- | <code bash ldap_rollback-ipa-client-to-nscd.sh> | ||
- | #!/bin/bash | ||
- | # Name: ldap_rollback-ipa-client-to-nscd.sh | ||
- | # Description: | ||
- | # Last Updated: 03/16/2016 | ||
- | # Recent Changes: | ||
- | ############################################################################################### | ||
- | |||
- | #### Functions Here: Main Starts After #### | ||
- | function check_os_type | ||
- | { | ||
- | if [ -f / | ||
- | distro=$(awk -F: ' | ||
- | major_version=$(awk -F: ' | ||
- | elif [ -f / | ||
- | distro=$(awk ' | ||
- | major_version=$(awk -F. ' | ||
- | fi | ||
- | } | ||
- | #### End of Functions #### | ||
- | |||
- | # | ||
- | # Main Starts Here | ||
- | # | ||
- | |||
- | # Pre-checks | ||
- | check_os_type | ||
- | |||
- | # | ||
- | # Confirm running the script | ||
- | # | ||
- | echo -e " | ||
- | echo -e "#### | ||
- | echo -e " | ||
- | echo | ||
- | echo -e " | ||
- | echo -e " | ||
- | echo -e " | ||
- | read run_script | ||
- | |||
- | if [[ ${run_script} != " | ||
- | echo -e " | ||
- | exit 1 | ||
- | fi | ||
- | |||
- | echo -e " | ||
- | ipa-client-install --uninstall | ||
- | |||
- | echo -e " | ||
- | case ${major_version} in | ||
- | " | ||
- | authconfig --enableforcelegacy --enableldap --enableldapauth --update | ||
- | ;; | ||
- | " | ||
- | authconfig --enableldap --enableldapauth --update | ||
- | ;; | ||
- | esac | ||
- | |||
- | echo -e " | ||
- | case ${major_version} in | ||
- | " | ||
- | systemctl restart nscd nslcd | ||
- | systemctl enable nscd nslcd | ||
- | ;; | ||
- | " | ||
- | service nscd restart | ||
- | service nslcd restart | ||
- | chkconfig nscd on | ||
- | chkconfig nslcd on | ||
- | ;; | ||
- | " | ||
- | service nscd restart | ||
- | chkconfig nscd on | ||
- | ;; | ||
- | esac | ||
- | |||
- | echo -e " | ||
- | echo -e "#### | ||
- | echo -e " | ||
- | </ | ||
- | |||
- | ---- | ||