diff options
author | Simo Sorce <simo@redhat.com> | 2015-07-28 11:31:16 -0400 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-10-15 14:24:33 +0200 |
commit | 5761f73e2598dc404a3b51c6810e3dd250d2ba11 (patch) | |
tree | 8abaf4037e15efef98d464d77d75f68cec9ffb29 /ipaserver/install/replication.py | |
parent | f7d1e4f9a21b0f3e63bd3bcd4a17acf749e0b208 (diff) | |
download | freeipa-5761f73e2598dc404a3b51c6810e3dd250d2ba11.tar.gz freeipa-5761f73e2598dc404a3b51c6810e3dd250d2ba11.tar.xz freeipa-5761f73e2598dc404a3b51c6810e3dd250d2ba11.zip |
Allow ipa-replica-conncheck to use default creds
If the user has already run kinit try to use those credentials.
The user can always override by explicitly passing the -p flag.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/install/replication.py')
-rw-r--r-- | ipaserver/install/replication.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py index 858e3f36b..45dea27bb 100644 --- a/ipaserver/install/replication.py +++ b/ipaserver/install/replication.py @@ -64,7 +64,8 @@ STRIP_ATTRS = ('modifiersName', def replica_conn_check(master_host, host_name, realm, check_ca, - dogtag_master_ds_port, admin_password=None): + dogtag_master_ds_port, admin_password=None, + principal="admin"): """ Check the ports used by the replica both locally and remotely to be sure that replication will work. @@ -74,10 +75,12 @@ def replica_conn_check(master_host, host_name, realm, check_ca, print("Run connection check to master") args = [paths.IPA_REPLICA_CONNCHECK, "--master", master_host, "--auto-master-check", "--realm", realm, - "--principal", "admin", "--hostname", host_name] nolog=tuple() + if principal is not None: + args.extend(["--principal", principal]) + if admin_password: args.extend(["--password", admin_password]) nolog=(admin_password,) |