I entered chmod -R 777 /usr/bin
and now sudo is not working.
It says sudo must be setuid root
.
Some advice online said to run chown root:root /usr/bin/sudo
.
chmod 4755 /usr/bin/sudo
On entering chown root:root /usr/bin/sudo
it shows an opened in readonly mode
error.
Best Answer
On an Ubuntu desktop system, PolicyKit is installed, so
pkexec
can be used to repair a brokensudo
executable orsudoers
file. You do not need to boot into recovery mode and you do not need to boot from a live CD. You don't even need to reboot.In this case, run the following commands:
See this question for more information.