Interview Prep/Linux/Permissions, Users & sudo

What are /etc/passwd, /etc/shadow and /etc/group?

BeginnerConceptPermissions, Users & sudo
Answer
  • /etc/passwd: name:x:UID:GID:GECOS:home:shell, world-readable.
  • /etc/shadow: password hashes, ageing data, root-only (0640 root:shadow or 0000).
  • /etc/group: group:x:GID:members.
getent passwd alice
getent group docker

Use getent instead of grep so LDAP/SSSD users are included.

All Linux questions Roadmap: Linux

More on Permissions, Users & sudo