Use getent admin@domain for nss check in ipa-client-install

Use 'getent admin@domain' rather than 'getent admin@REALM' to check if nss
is working properly since admin@REALM check fails in case the domain and the realm
name does not match.

https://fedorahosted.org/freeipa/ticket/3906
This commit is contained in:
Tomas Babej
2013-09-18 13:18:37 +02:00
committed by Petr Viktorin
parent 8c03b1dbcd
commit 316a9c2159

View File

@@ -2502,7 +2502,7 @@ def install(options, env, fstore, statestore):
# Particulary, SSSD might take longer than 6-8 seconds.
while n < 10 and not found:
try:
ipautil.run(["getent", "passwd", "admin@%s" % cli_realm])
ipautil.run(["getent", "passwd", "admin@%s" % cli_domain])
found = True
except Exception, e:
time.sleep(1)
@@ -2511,7 +2511,7 @@ def install(options, env, fstore, statestore):
if not found:
root_logger.error(
"Unable to find 'admin' user with "
"'getent passwd admin@%s'!" % cli_realm)
"'getent passwd admin@%s'!" % cli_domain)
if conf:
root_logger.info("Recognized configuration: %s", conf)
else: