You are here: Home Tech Notes Linux Linux CLI: List Users and Groups
Linux CLI: List Users and Groups PDF Print E-mail
User Rating: / 0
PoorBest 
Tech Notes - Linux
Written by Rick   
Tuesday, 26 August 2008 00:00

At times it's necessary to get a list of users and groups on a Linux system from the command line interface (CLI). The files containing the information are located in your /etc directory.

passwd - This file stores the users and passwords for the subject system. (Note: Ubuntu uses Shadow passwords. The actual encrypted password is stored in /etc/shadow. In the /etc/passwd file, the encrypted password has been replaced by an "x".)

group -  This file stores the user groups and group passwords. (Note: Shadow passwords apply here too. The file containing the group passwords is /etc/gshadow).

To display the content of the above files, use the "cat" command (i.e.; cat /etc/passwd).

Comments (0)
Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):S
:!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.