Mikey’s Linux Field NotesAll topics

GUIDE 04 / ADMINISTRATION

Users & groups

Read account records, understand identities, and inspect login availability.

2 quick lessons · Examples to adapt to your server
In this guide
Read account recordsInspect account availability

Commands use class paths and example filenames. Replace placeholders and inspect the target before making changes.

01

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.

COMMANDS & EXAMPLES
getent passwd mkeel
id mkeel
getent group wheel
wc -l /etc/passwd
Field note

getent 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.

02

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.

COMMANDS & EXAMPLES
sudo passwd -S USERNAME
sudo chage -l USERNAME
getent passwd USERNAME
Field note

Replace 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.