Differences
This shows you the differences between two versions of the page.
linux_wiki:freeipa_client_remove [2019/05/25 23:50] |
linux_wiki:freeipa_client_remove [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== FreeIPA Client Remove ====== | ||
+ | |||
+ | **General Information** | ||
+ | |||
+ | Removing a client from FreeIPA server enrollment. | ||
+ | |||
+ | **Checklist** | ||
+ | * Distro(s): Enterprise Linux 6/7 | ||
+ | * Other: [[http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== The Script ====== | ||
+ | |||
+ | <code bash ipa-remove-client.sh> | ||
+ | #!/bin/bash | ||
+ | # Name: ipa-remove-client.sh | ||
+ | # Description: | ||
+ | # Last Updated: 12/28/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 " | ||
+ | rm -fv / | ||
+ | |||
+ | echo -e " | ||
+ | rm -fv / | ||
+ | |||
+ | echo -e " | ||
+ | echo -e "#### | ||
+ | echo -e " | ||
+ | </ | ||
+ | |||
+ | ---- | ||