Help! I Renamed Sudo and Now I Can't Use It
Asked by
TechNinja42
I accidentally renamed the sudo command in my system while trying to make some changes. I went to /usr/bin and renamed sudo to squidd, and then attempted to do the same in /usr/libexec. Now I can't use sudo at all. I considered switching to the root user, but I never set a password for it. What should I do to fix this?
Answers
Reinstalling your OS might be the quickest solution if you can't figure it out. Itโs always a pain, but sometimes that's the easiest route.
Reply to this answer
You might want to try switching to the root user and renaming that file back to 'sudo'. Typically, if you haven't set a root password, it defaults to the same as your install user.
Reply to this answer
Alternatively, you can boot into single user mode or a similar recovery environment, depending on your distribution. You should be able to undo your changes there without too much hassle.
Reply to this answer
If you didn't set a root password, logging in directly as root might not work. A straightforward solution is to boot from a live CD or USB. This way, you can access your filesystem and rename 'squidd' back to 'sudo' from another OS.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions