I have some issues with files /etc/passwd
and /etc/shadow
. Both of them are without permissions.
And I don't know how this happened or why. Basically I can't edit/remove these files or change permissions when I am logged as the root user. It ends with Operation not permitted. Eg. when I try:
root@server:/etc# chmod 600 passwd
chmod: changing permissions of ‘passwd’: Operation not permitted
Whats the fix???????
ls -l /etc/passwd /etc/shadow
? Because it seems strange to change permissions on these 2 filessudo
. I do agree with @damadam that it seems strange you need to chmod them, and would recommend caution./etc
is probably mounted read-only.