![]() |
Linux AMI - Error: sudo: must be setuid root
I am using Amazon Linux AMI. I do not have password of root. I am just a user.
I was executing commands using sudo. It did not ask me any password and command was executed fine. Ex- sudo rm -r /home/username/directoryname or sudo yum install software-name and it was working fine. But unfortunately I have set permission of /usr/bin is 777 (drwxrwxrwx). that is why permission of /usr/bin/sudo is become 777 (-rwxrwxrwx). Now when I am using any sudo command , I get an error Code:
sudo: must be setuid rootCode:
sudo: must be setuid rootCode:
chmod: changing permissions of `filename': Operation not permittedPlease solve this problem. I am not able to execute any command now. |
Quote:
https://www.linuxquestions.org/quest...d-root-854117/ If you can't change permissions on a file, and you can't get root access or boot from CD/DVD, your only other hope is to restore that directory from backups, and exercise some caution in the future. That's why you should NEVER play around with root or sudo access, to avoid situations like this. |
Quote:
If I would be root. I would not execute command using sudo and the problem will be solved long before posting here. |
Quote:
Quote:
So, you've been told:
|
| All times are GMT -5. The time now is 09:12 AM. |