Issue when logging in

So, a while ago, I had some troubles updating ruby, and not wanting to deal with it, I decided that

sudo chmod -R 777 /usr/bin

would probably solve my issue, and it did.
However, I couldn’t use sudo afterward, which I fixed by login in as root in the tty console and executing

mount -o remount,rw /
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo

and for a while everything seemed to work.
But now to my actual problem. I can only login directly after startup, and as soon as I log out/close my laptop I can’t login anymore, only getting the message “Authentication Failed”. In the tty console both my user and the root login work fine, and sudo works just like you would expect it to, the only problem is when attempting to login again after logging out.

You hit it with a hammer and now it’s broken. Unix permissions are very complicated and you can’t just do things like that.
I would recommend a reinstall.

3 Likes