GUIDE 04 / ADMINISTRATION
Users & groups
Read account records, understand identities, and inspect login availability.
In this guide
Commands use class paths and example filenames. Replace placeholders and inspect the target before making changes.
Read account records
The seven /etc/passwd fields are username, password placeholder, UID, GID, comment, home directory, and login shell. An x indicates a shadow password entry; it does not mean the account is disabled.
getent passwd mkeel
id mkeel
getent group wheel
wc -l /etc/passwdgetent queries configured name-service sources, which may include directory services as well as local files. The wheel group commonly receives sudo privileges on RHEL when sudoers allows it.
Inspect account availability
A password lock, account expiration, a non-login shell, and SSH access rules are separate controls. Review each before deciding whether an account can log in.
sudo passwd -S USERNAME
sudo chage -l USERNAME
getent passwd USERNAMEReplace USERNAME with the intended account. A locked password does not necessarily block SSH keys. Expiration enforcement depends on the service and its account checks, often through PAM. Existing sessions may remain open.