I have changed my ubuntu super password by recovery mode after that i can"t run my sudo command in normal user

i have attempted to crack my previous password in Recovery mode i followed this link to crack my password

sudo: /usr/local/bin/sudo must be owned by uid 0 and have the setuid bit set

-r-sr-xr-x 1 root root 136808 May 29 2017 sudo

/usr/local/bin$ ./sudo ---> i need this /usr/local/bin ./sudo not working also throw the below errorsudo: ./sudo must be owned by uid 0 and have the setuid bit set

/usr/bin$ ./sudo --> working fine

usage: sudo -h | -K | -k | -VMy question is

I need to Access my sudo comand from the terminal from anywhere i need to run

Any help will be appreciated

ubuntu sudo setuid
Improve this question
edited Jan 23 "18 at 16:09
muthukumar selvaraj
asked Jan 23 "18 at 15:52

muthukumar selvarajmuthukumar selvaraj
11311 gold badge11 silver badge66 bronze badges
| Show 1 more comment

3 Answers 3

Active Oldest Votes
You shouldn’t have a /usr/local/bin/sudo, that’s what’s breaking things (not the password change). Move it out of the way:

/usr/bin/sudo mv /usr/local/bin/sudo,2and then tell your shell about it:

hash -rThat will restore the sudo functionality you’re used to.

You are watching: Sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Improve this answer
answered Jan 23 "18 at 16:07

Stephen KittStephen Kitt
317k4242 gold badges809809 silver badges905905 bronze badges
| Show 5 more comments
I recently experienced this problem because I ran the following command

sudo chmod -R 777 /usr/*Unfortunately /usr/bin/sudo is not owned by root and breaks as a result.

To fix the problem I booted into recovery mode which provides a scroll down menu with an option to drop down to a root shell.

From the root shell I ran the following commands:

# remount disks in read write modemount -o remount,rw /mount --all# return ownershipchown root:root /usr/bin/sudo# fix permissionschmod 4755 /usr/bin/sudorebootThis solved my problems once I logged back in as a user.

Improve this answer
edited Feb 9 at 16:20

answered Sep 5 "19 at 4:00

Andrew JudellAndrew Judell
2133 bronze badges
Add a comment |
It works for me when I reboot, and go to advance recovery, and run these commands:

mount -o remount,rw /chown roo:root /usr/bin/sudochmod 4755 /usr/bin/sudoreboot
Improve this answer
edited Oct 2 "19 at 21:53


77.7k1111 gold badges103103 silver badges197197 bronze badges
answered Oct 2 "19 at 15:54
Add a comment |

Your Answer

Thanks for contributing an answer to rwcchristchurchappeal.com & Linux Stack Exchange!

Please be sure to answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

See more: Synonyms For Argument &Quot;No&Quot; Is Missing, With No Default

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Facebook
Sign up using Email and Password

Post as a guest

Email Required, but never shown

Post as a guest


Required, but never shown

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged ubuntu sudo setuid or ask your own question.

The Overflow Blog
Featured on Meta
How to get back sudo on Ubuntu?
Parallels on Mac - can no longer sudo within Ubuntu
How to prevent the caller's shell from being used in sudo
How to fix a corruption .profile file for sudo user
Which user's password does `sudo` asks for?
How can I prevent a process to change its setuid bit back to RUID within the process itself
Why doesn't setuid() work with non-root users?
Asked for sudo password only sometimes
SUDO successful for Active Directory admin group member using wrong password
Hot Network Question more hot questions

Question feed
Subscribe to RSS
Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

rwcchristchurchappeal.com & Linux
Stack Exchange Network
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.9.23.40291

Linux is a registered trademark of Linus Torvalds. rwcchristchurchappeal.com is a registered trademark of The Open Group. This site is not affiliated with Linus Torvalds or The Open Group in any way.
rwcchristchurchappeal.com & Linux Stack Exchange works best with JavaScript enabled

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.