So I accidentally typed: sudo chmod a-wrx /etc
and since etc contains sudeors.d
and many other critical stuff, I couldn't log in/out or perform any administration tasks.
I loaded GRUB and went root from there, I did:
chmod a+wrx /etc
and finally logged to the machine, but it's now messed up (can't shutdown properly, look has changed, ...etc).
How do I restore the default permissions for etc (or any file system) that came shipped with the installation (without reinstalling the system) ?
chmod a+wrx /etc
or equivalent, I can use sudo to make changes. I used sudo instead of gksudo, is it okay ? 2- last commandchmod -R a+r /etc
didn't work with both sudo and gksudo. sudo says: no valid sudoers sources found, quitting. gksudo says invalid option -- 'R' because somehow (I think) the command is formatted improperly.