How to check local accounts in RHEL 7

How can I check all local user accounts in RHEL 7 that one can login using ssh or console on the server?

See the /etc/passwd file, which contains one line for each Linux user account. Same file for RHEL 7 too:

cat /etc/passwd
more /etc/passswd
# search it for root
grep '^root' /etc/passwd
# search for root, foo and bar users 
egrep '^(root|foo|bar)' /etc/passwd
1 Like

More here:

1 Like

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki