What are the default permissions for /etc/passwd on Debian distributions?
1 Answer
The /etc/passwd file should have read permission allowed for all users (many utilities, like ls, use it to map user IDs to usernames), but write access only for the root user.
To completely restore the right permissions, use:
chmod 644 /etc/passwd
chown root: /etc/passwd
See man 5 passwd.
-
Note there are no passwords in the password file, so it is safe for all to read. There are password hashes (one way encrypted) in
/etc/shadow.ctrl-alt-delor– ctrl-alt-delor2019-11-30 13:28:19 +00:00Commented Nov 30, 2019 at 13:28