pytest-testinfra
pytest-testinfra copied to clipboard
Query all usernames and group names
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 passwdresp.getent group - query local users and groups with
cat /etc/passwdresp.cat /etc/group
Small tests of all functions are also part of this pull request.
What do you think about such functionality?