0
sghk1> id
uid=0(root) gid=0(root)
sghk1> ls -l /etc/shadow
-r-------- 1 root sys 4045 Aug 24 15:52 /etc/shadow
sghk1> ls -l /usr/bin/passwd
-r-sr-sr-x 1 root sys 26764 Jan 11 2012 /usr/bin/passwd
When I try to vi edit and the file, and :wq, it prompt the below
"/etc/shadow" File is read only
Why is it that when I call /usr/bin/passwd, the file is writable/changeable by the executable , but when I try to manually edit as root, I can't
If you really want to write, use
:wq!
– Cyrus – 2015-08-24T08:57:26.613