URL: https://github.com/freeipa/freeipa/pull/829
Author: Tiboris
 Title: #829: client.py: Replace hardcoded 'admin' with options.principal
Action: opened

PR body:
"""
Fixes: https://pagure.io/freeipa/issue/5406
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/829/head:pr829
git checkout pr829
From 15f06becb3b829885ae297d92bb9cd6ce6f8c654 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tibor=20Dudl=C3=A1k?= <tdud...@redhat.com>
Date: Tue, 30 May 2017 14:36:00 +0200
Subject: [PATCH] client.py: Replace hardcoded 'admin' with options.principal

Fixes: https://pagure.io/freeipa/issue/5406
---
 ipaclient/install/client.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py
index 1aa50372a4..da00f70fbf 100644
--- a/ipaclient/install/client.py
+++ b/ipaclient/install/client.py
@@ -2915,7 +2915,8 @@ def _install(options):
             # Particulary, SSSD might take longer than 6-8 seconds.
             while n < 10 and not found:
                 try:
-                    ipautil.run(["getent", "passwd", "admin@%s" % cli_domain])
+                    ipautil.run(["getent", "passwd", "%s@%s"
+                                % (options.principal, cli_domain)])
                     found = True
                 except Exception as e:
                     time.sleep(1)
@@ -2923,8 +2924,8 @@ def _install(options):
 
             if not found:
                 root_logger.error(
-                    "Unable to find 'admin' user with "
-                    "'getent passwd admin@%s'!" % cli_domain)
+                    "Unable to find '%s' user with 'getent passwd %s@%s'!"
+                    % (options.principal, options.principal, cli_domain))
                 if conf:
                     root_logger.info("Recognized configuration: %s", conf)
                 else:
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to