pytest-testinfra icon indicating copy to clipboard operation
pytest-testinfra copied to clipboard

Query all usernames and group names

Open CarstenGrohmann opened this issue 2 years ago • 0 comments

We need some functionality to query all user names as well as all group names. I implemented in two functions:

  • query all (local and remove) users and groups with getent passwd resp. getent group
  • query local users and groups with cat /etc/passwd resp. cat /etc/group

Small tests of all functions are also part of this pull request.

What do you think about such functionality?

CarstenGrohmann avatar Jun 27 '23 12:06 CarstenGrohmann