← Users & Permissions
Linux · Users & Permissions

How to view user account details in Linux

View a user account entry and password aging with getent passwd and chage -l.


Look up a user account: shell, home directory, UID/GID, and password aging. getent reads passwd whether the user is local or from LDAP/SSSD.

# Account entry (shell, home, uid, gid)
getent passwd <user>

# Password aging: last change, expiry, warning
sudo chage -l <user>

# Local users with a real login shell (rough filter)
getent passwd | awk -F: '$7 !~ /nologin|false/ {print $1, $7}'
Linuxgetentchage