sudo must be owned by uid 0 and have the setuid bit set

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












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 ---In global mode throws me an below error



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



>>$ ls -l sudo --> permissions



-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 error
sudo: ./sudo must be owned by uid 0 and have the setuid bit set



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



usage: sudo -h | -K | -k | -V


My question is



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



Any help will be appreciated







share|improve this question


















  • 1




    Please edit your question add the full output of ls -l /usr/local/bin/sudo
    – Andy Dalton
    Jan 23 at 15:53










  • i have updated above question with ls -l sudo outupt @AndyDalton
    – muthukumar
    Jan 23 at 16:02






  • 1




    Can you add the output of which sudo as well
    – CyberJacob
    Jan 23 at 16:04






  • 4




    Why do you even have a /usr/local/bin/sudo?
    – steeldriver
    Jan 23 at 16:04










  • /usr/local/bin/sudo yes i have and that also throwing the set uid error
    – muthukumar
    Jan 23 at 16:10














up vote
0
down vote

favorite












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 ---In global mode throws me an below error



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



>>$ ls -l sudo --> permissions



-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 error
sudo: ./sudo must be owned by uid 0 and have the setuid bit set



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



usage: sudo -h | -K | -k | -V


My question is



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



Any help will be appreciated







share|improve this question


















  • 1




    Please edit your question add the full output of ls -l /usr/local/bin/sudo
    – Andy Dalton
    Jan 23 at 15:53










  • i have updated above question with ls -l sudo outupt @AndyDalton
    – muthukumar
    Jan 23 at 16:02






  • 1




    Can you add the output of which sudo as well
    – CyberJacob
    Jan 23 at 16:04






  • 4




    Why do you even have a /usr/local/bin/sudo?
    – steeldriver
    Jan 23 at 16:04










  • /usr/local/bin/sudo yes i have and that also throwing the set uid error
    – muthukumar
    Jan 23 at 16:10












up vote
0
down vote

favorite









up vote
0
down vote

favorite











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 ---In global mode throws me an below error



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



>>$ ls -l sudo --> permissions



-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 error
sudo: ./sudo must be owned by uid 0 and have the setuid bit set



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



usage: sudo -h | -K | -k | -V


My question is



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



Any help will be appreciated







share|improve this question














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 ---In global mode throws me an below error



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



>>$ ls -l sudo --> permissions



-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 error
sudo: ./sudo must be owned by uid 0 and have the setuid bit set



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



usage: sudo -h | -K | -k | -V


My question is



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



Any help will be appreciated









share|improve this question













share|improve this question




share|improve this question








edited Jan 23 at 16:09

























asked Jan 23 at 15:52









muthukumar

10315




10315







  • 1




    Please edit your question add the full output of ls -l /usr/local/bin/sudo
    – Andy Dalton
    Jan 23 at 15:53










  • i have updated above question with ls -l sudo outupt @AndyDalton
    – muthukumar
    Jan 23 at 16:02






  • 1




    Can you add the output of which sudo as well
    – CyberJacob
    Jan 23 at 16:04






  • 4




    Why do you even have a /usr/local/bin/sudo?
    – steeldriver
    Jan 23 at 16:04










  • /usr/local/bin/sudo yes i have and that also throwing the set uid error
    – muthukumar
    Jan 23 at 16:10












  • 1




    Please edit your question add the full output of ls -l /usr/local/bin/sudo
    – Andy Dalton
    Jan 23 at 15:53










  • i have updated above question with ls -l sudo outupt @AndyDalton
    – muthukumar
    Jan 23 at 16:02






  • 1




    Can you add the output of which sudo as well
    – CyberJacob
    Jan 23 at 16:04






  • 4




    Why do you even have a /usr/local/bin/sudo?
    – steeldriver
    Jan 23 at 16:04










  • /usr/local/bin/sudo yes i have and that also throwing the set uid error
    – muthukumar
    Jan 23 at 16:10







1




1




Please edit your question add the full output of ls -l /usr/local/bin/sudo
– Andy Dalton
Jan 23 at 15:53




Please edit your question add the full output of ls -l /usr/local/bin/sudo
– Andy Dalton
Jan 23 at 15:53












i have updated above question with ls -l sudo outupt @AndyDalton
– muthukumar
Jan 23 at 16:02




i have updated above question with ls -l sudo outupt @AndyDalton
– muthukumar
Jan 23 at 16:02




1




1




Can you add the output of which sudo as well
– CyberJacob
Jan 23 at 16:04




Can you add the output of which sudo as well
– CyberJacob
Jan 23 at 16:04




4




4




Why do you even have a /usr/local/bin/sudo?
– steeldriver
Jan 23 at 16:04




Why do you even have a /usr/local/bin/sudo?
– steeldriver
Jan 23 at 16:04












/usr/local/bin/sudo yes i have and that also throwing the set uid error
– muthukumar
Jan 23 at 16:10




/usr/local/bin/sudo yes i have and that also throwing the set uid error
– muthukumar
Jan 23 at 16:10










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










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,2


and then tell your shell about it:



hash -r


That will restore the sudo functionality you’re used to.






share|improve this answer




















  • now it throws me an error -bash: /usr/local/bin/sudo: No such file or directory
    – muthukumar
    Jan 23 at 16:13







  • 2




    Did you run hash -r? Do you have an alias set?
    – Stephen Kitt
    Jan 23 at 16:14






  • 2




    What is your PATH?
    – DopeGhoti
    Jan 23 at 16:16










  • yes i have run hash -r -- /usr/bin/sudo --> working properly with sudo command
    – muthukumar
    Jan 23 at 16:16










  • what does which sudo show?
    – mik
    Jan 23 at 22:16










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f419122%2fsudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










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,2


and then tell your shell about it:



hash -r


That will restore the sudo functionality you’re used to.






share|improve this answer




















  • now it throws me an error -bash: /usr/local/bin/sudo: No such file or directory
    – muthukumar
    Jan 23 at 16:13







  • 2




    Did you run hash -r? Do you have an alias set?
    – Stephen Kitt
    Jan 23 at 16:14






  • 2




    What is your PATH?
    – DopeGhoti
    Jan 23 at 16:16










  • yes i have run hash -r -- /usr/bin/sudo --> working properly with sudo command
    – muthukumar
    Jan 23 at 16:16










  • what does which sudo show?
    – mik
    Jan 23 at 22:16














up vote
3
down vote



accepted










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,2


and then tell your shell about it:



hash -r


That will restore the sudo functionality you’re used to.






share|improve this answer




















  • now it throws me an error -bash: /usr/local/bin/sudo: No such file or directory
    – muthukumar
    Jan 23 at 16:13







  • 2




    Did you run hash -r? Do you have an alias set?
    – Stephen Kitt
    Jan 23 at 16:14






  • 2




    What is your PATH?
    – DopeGhoti
    Jan 23 at 16:16










  • yes i have run hash -r -- /usr/bin/sudo --> working properly with sudo command
    – muthukumar
    Jan 23 at 16:16










  • what does which sudo show?
    – mik
    Jan 23 at 22:16












up vote
3
down vote



accepted







up vote
3
down vote



accepted






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,2


and then tell your shell about it:



hash -r


That will restore the sudo functionality you’re used to.






share|improve this answer












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,2


and then tell your shell about it:



hash -r


That will restore the sudo functionality you’re used to.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 23 at 16:07









Stephen Kitt

142k22308371




142k22308371











  • now it throws me an error -bash: /usr/local/bin/sudo: No such file or directory
    – muthukumar
    Jan 23 at 16:13







  • 2




    Did you run hash -r? Do you have an alias set?
    – Stephen Kitt
    Jan 23 at 16:14






  • 2




    What is your PATH?
    – DopeGhoti
    Jan 23 at 16:16










  • yes i have run hash -r -- /usr/bin/sudo --> working properly with sudo command
    – muthukumar
    Jan 23 at 16:16










  • what does which sudo show?
    – mik
    Jan 23 at 22:16
















  • now it throws me an error -bash: /usr/local/bin/sudo: No such file or directory
    – muthukumar
    Jan 23 at 16:13







  • 2




    Did you run hash -r? Do you have an alias set?
    – Stephen Kitt
    Jan 23 at 16:14






  • 2




    What is your PATH?
    – DopeGhoti
    Jan 23 at 16:16










  • yes i have run hash -r -- /usr/bin/sudo --> working properly with sudo command
    – muthukumar
    Jan 23 at 16:16










  • what does which sudo show?
    – mik
    Jan 23 at 22:16















now it throws me an error -bash: /usr/local/bin/sudo: No such file or directory
– muthukumar
Jan 23 at 16:13





now it throws me an error -bash: /usr/local/bin/sudo: No such file or directory
– muthukumar
Jan 23 at 16:13





2




2




Did you run hash -r? Do you have an alias set?
– Stephen Kitt
Jan 23 at 16:14




Did you run hash -r? Do you have an alias set?
– Stephen Kitt
Jan 23 at 16:14




2




2




What is your PATH?
– DopeGhoti
Jan 23 at 16:16




What is your PATH?
– DopeGhoti
Jan 23 at 16:16












yes i have run hash -r -- /usr/bin/sudo --> working properly with sudo command
– muthukumar
Jan 23 at 16:16




yes i have run hash -r -- /usr/bin/sudo --> working properly with sudo command
– muthukumar
Jan 23 at 16:16












what does which sudo show?
– mik
Jan 23 at 22:16




what does which sudo show?
– mik
Jan 23 at 22:16












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f419122%2fsudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?