diff options
author | Karl MacMillan <kmacmill@redhat.com> | 2007-10-22 11:58:31 -0400 |
---|---|---|
committer | Karl MacMillan <kmacmill@redhat.com> | 2007-10-22 11:58:31 -0400 |
commit | 2703be51c85fd8a64613c15b1aba565ca08c48b4 (patch) | |
tree | 85cfec7a5e3b85c47a8872554d864bda2e66dce5 /ipa-client | |
parent | f5cc36507bdbcbc57c2028df8c8eae969a5e40da (diff) | |
download | freeipa-2703be51c85fd8a64613c15b1aba565ca08c48b4.tar.gz freeipa-2703be51c85fd8a64613c15b1aba565ca08c48b4.tar.xz freeipa-2703be51c85fd8a64613c15b1aba565ca08c48b4.zip |
Print warning about NTP
After looking into setting up ntpd on the IPA servers I decided it
was better just to warn admins. There are just too many valid setups
for time synchronization for us to try to get this right. Additionally,
just installing ntp and accepting the default config will result in
a configuration that is perfectly valid for IPA.
This patch checks if ntpd is running and suggests enabling it if it
is not - for client and server. It also adds some suggested next
steps to the server installation.
Diffstat (limited to 'ipa-client')
-rw-r--r-- | ipa-client/ipa-install/ipa-client-install | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 895756c6..0e89a66b 100644 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -67,6 +67,14 @@ def logging_setup(options): console.setFormatter(formatter) logging.getLogger('').addHandler(console) +def check_ntp(): + ret_code = 1 + p = subprocess.Popen(["/sbin/service", "ntpd", "status"], stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + stdout, stderr = p.communicate() + + return p.returncode + def main(): options = parse_options() logging_setup(options) @@ -200,6 +208,11 @@ def main(): #Modify pam to add pam_krb5 run(["/usr/sbin/authconfig", "--enablekrb5", "--update"]) + # print warning about ntp + if check_ntp() != 0: + print "WARNING: Kerberos requires time synchronization between clients" + print "and servers for correct operation. You should consider enabling ntpd." + return 0 main() |