Differences
This shows you the differences between two versions of the page.
linux_wiki:freeipa_report_ldap_config [2019/05/25 23:50] |
linux_wiki:freeipa_report_ldap_config [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== FreeIPA: Report LDAP Config ====== | ||
+ | |||
+ | **General Information** | ||
+ | |||
+ | Output all low level LDAP Config settings. | ||
+ | |||
+ | **Checklist** | ||
+ | * Distro(s): | ||
+ | * Other: [[http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== The Script ====== | ||
+ | |||
+ | <code bash report-ldap-config.sh> | ||
+ | #!/bin/bash | ||
+ | # Name: report-ldap-config.sh | ||
+ | # Description: | ||
+ | # Last Updated: 2016-10-07 | ||
+ | # Recent Changes: | ||
+ | ############################################################################################### | ||
+ | |||
+ | ##### Customize These Variables ##### | ||
+ | ## LDAP Connection Settings ## | ||
+ | |||
+ | # Directory Manager User | ||
+ | ldapUser=' | ||
+ | |||
+ | # Directory Manager Password | ||
+ | dmPass=' | ||
+ | |||
+ | # Server Hostname (FQDN) | ||
+ | ldapHost=' | ||
+ | ##### End of Customize Variables ##### | ||
+ | |||
+ | # | ||
+ | # Functions; Main starts after | ||
+ | # | ||
+ | function show_usage | ||
+ | { | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | echo -e "-> FreeIPA admin access." | ||
+ | echo -e | ||
+ | } | ||
+ | |||
+ | # | ||
+ | # Get Script Arguments | ||
+ | # | ||
+ | # Reset POSIX variable in case it has been used previously in this shell | ||
+ | OPTIND=1 | ||
+ | |||
+ | while getopts " | ||
+ | case " | ||
+ | h) # -h (help) argument | ||
+ | show_usage | ||
+ | exit 0 | ||
+ | ;; | ||
+ | *) # invalid argument | ||
+ | show_usage | ||
+ | exit 0 | ||
+ | ;; | ||
+ | esac | ||
+ | done | ||
+ | |||
+ | # | ||
+ | # Main Starts Here | ||
+ | # | ||
+ | echo -e " | ||
+ | ldapsearch -D " | ||
+ | </ | ||
+ | |||
+ | ---- | ||