13 July,2018 by Jack Vamvas
Question: I'd like to capture Linux local users who are not system users and also return the server name and group associated with the local user. What statement can I execute to create this list ?
Answer: Linux offers a number of different methods to report on local users and other meta data associated with the user such as groups and permissions .
This code snippet will return non-system users and exclude "user1" and "user2". I've added that predicate to give you some flexibility around how you construct the code.
Based on the details - the hostname and the group of the user is returned
Run the code through cmdline
Read more on Linux