13 July,2018 by Tom Collins
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
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |