Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

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 

 

Read more on Linux

3 signs of low Linux memory (DBA DB2)

Powershell grep and awk (DBA DB2)



This post first appeared on DBA-DB2.com, please read the originial post: here

Share the post

How to list Linux non-system local users

×

Subscribe to Dba-db2.com

Get updates delivered right to your inbox!

Thank you for your subscription

×