I accidentally moved my
/bin directory to
/usr/bin/bin, anyway, I managed to move it back to its place with
# /usr/bin/bin/mkdir /bin # /usr/bin/bin/mv /usr/bin/bin /
and then I was able to login as root, but I wasn't able to
su from my user, it gave me an authentication error. I ran
chmod +s /bin/su and
chmod u+s /bin/su as root, and it fixed it.
another thing I noticed is that I can't
ping either; it gives me this error:
$ ping 192.168.1.1 ping: icmp open socket: Operation not permitted
and this is my ping file:
-rwxr-xr-x 1 root root 44K Jun 30 20:38 /bin/ping
I guess I messed up all the permissions and SGID on my
/bin folder. Is there any way to fix this? (other than formatting)
Just for the record, I'm using a 64 bit Debian 8.