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