Quantcast
Viewing all articles
Browse latest Browse all 10

How to list Linux non-system local users

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 

  Image may be NSFW.
Clik here to view.
Linux_local_users

Read more on Linux

3 signs of low Linux memory (DBA DB2)

Powershell grep and awk (DBA DB2)


Viewing all articles
Browse latest Browse all 10

Trending Articles