What users have accounts on my system?
Author: Deron Eriksson
Description: This tutorial demonstrates how to display the contents of the /etc/passwd file.
Tutorial created using: CentOS release 4.6
Accounts on a Linux system are listed in the /etc/passwd file.
Notice that the contents of the /etc/passwd file display many accounts in addition to the user accounts. One way that we can limit this is to filter the results to only show accounts with /home directories. We can do this by piping the contents of /etc/passwd to grep and filtering on :/home.
cat /etc/passwd | grep :/home