We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ce7ac4 commit cd14ee0Copy full SHA for cd14ee0
pyinfra/facts/server.py
@@ -363,7 +363,11 @@ class Groups(FactBase[List[str]]):
363
"""
364
365
def command(self):
366
- return "cat /etc/group"
+ # getent will return the same output as `cat /etc/groups` but will
367
+ # respect nsswitch.conf settings, e.g. for using LDAP as additional source
368
+ # Note, that LDAP e.g. using sssd might be configured to not enumerate
369
+ # all groups / users, in which case only the local groups will be returned
370
+ return "getent group"
371
372
default = list
373
0 commit comments