Middle
Tell about /etc/passwd and /etc/shadow — what is the difference?
sobes.tech AI
Answer from AI
/etc/passwd and /etc/shadow are system files in Linux related to user accounts.
-
/etc/passwd contains information about users: login, UID, GID, home directory, shell, and (previously) password hash. Currently, the password field usually contains a placeholder (e.g., "x") to avoid storing passwords here.
-
/etc/shadow contains encrypted user passwords and information about password expiration. Access to this file is restricted to enhance security.
Thus, /etc/passwd is a publicly accessible file with basic user information, while /etc/shadow is a protected file with confidential authentication data.