mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-01 04:14:42 +00:00
ipaclient_setup_nss: paths.GETENT is not available before freeipa-4.6.90.pre1
Fallback for older releases has been added to use '/usr/bin/getent' if paths.GETENT is not defined.
This commit is contained in:
@@ -460,6 +460,10 @@ def main():
|
|||||||
# It can sometimes take a few seconds to connect to the remote
|
# It can sometimes take a few seconds to connect to the remote
|
||||||
# provider.
|
# provider.
|
||||||
# Particulary, SSSD might take longer than 6-8 seconds.
|
# Particulary, SSSD might take longer than 6-8 seconds.
|
||||||
|
if hasattr(paths, "GETENT"):
|
||||||
|
getent_cmd = paths.GETENT
|
||||||
|
else:
|
||||||
|
getent_cmd = '/usr/bin/getent'
|
||||||
while n < 10 and not found:
|
while n < 10 and not found:
|
||||||
try:
|
try:
|
||||||
ipautil.run([getent_cmd, "passwd", user])
|
ipautil.run([getent_cmd, "passwd", user])
|
||||||
|
|||||||
Reference in New Issue
Block a user