sudo must be owned by uid 0 and have the setuid bit setHow to get back sudo on Ubuntu?Are there any...
If I sell my PS4 game disc and buy a digital version, can I still access my saved game?
split a six digits number column into separated columns with one digit
Why does the UK Prime Minister need the permission of Parliament to call a general election?
How many people can lift Thor's hammer?
Identifying the following distribution
Round away from zero
What's the point of this macro?
Is Sanskrit really the mother of all languages?
Mute single speaker?
Never make public members virtual/abstract - really?
What quests do you need to stop at before you make an enemy of a faction for each faction?
Why don't they build airplanes from 3D printer plastic?
How do I delete cookies from a specific site?
How can I oppose my advisor granting gift authorship to a collaborator?
Professor refuses to write a recommendation letter to students who haven't written a research paper with him
Which costing factors go into the optimizer choosing different types of spools?
How quickly would a wooden treasure chest rot?
If I have an accident, should I file a claim with my car insurance company?
What's the eccentricity of an orbit (trajectory) falling straight down towards the center?
Is there a reason effects that introduce another combat phase also create another main phase?
In-universe, why does Doc Brown program the time machine to go to 1955?
Is it possible to observe space debris with Binoculars?
What's this constructed number's starter?
How would this 10s/20s steepener work
sudo must be owned by uid 0 and have the setuid bit set
How to get back sudo on Ubuntu?Are there any better/safer methods to launch the OpenVPN client as a normal user?Parallels on Mac - can no longer sudo within UbuntuHow to prevent the caller's shell from being used in sudoHow to fix a corrupt .profile file for sudo userWhat exactly differentiates the root user from every other user?What to do if the owner of /usr/bin/* changes to a non-root?Debug a setuid binary as non-rootWhich 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
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
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
ubuntu sudo setuid
|
show 1 more comment
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
ubuntu sudo setuid
1
Please edit your question add the full output ofls -l /usr/local/bin/sudo
– Andy Dalton
Jan 23 '18 at 15:53
i have updated above question withls -l sudo
outupt @AndyDalton
– muthukumar
Jan 23 '18 at 16:02
1
Can you add the output ofwhich sudo
as well
– CyberJacob
Jan 23 '18 at 16:04
4
Why do you even have a/usr/local/bin/sudo
?
– steeldriver
Jan 23 '18 at 16:04
/usr/local/bin/sudo
yes i have and that also throwing the set uid error
– muthukumar
Jan 23 '18 at 16:10
|
show 1 more comment
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
ubuntu sudo setuid
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
ubuntu sudo setuid
ubuntu sudo setuid
edited Jan 23 '18 at 16:09
muthukumar
asked Jan 23 '18 at 15:52
muthukumarmuthukumar
1031 silver badge5 bronze badges
1031 silver badge5 bronze badges
1
Please edit your question add the full output ofls -l /usr/local/bin/sudo
– Andy Dalton
Jan 23 '18 at 15:53
i have updated above question withls -l sudo
outupt @AndyDalton
– muthukumar
Jan 23 '18 at 16:02
1
Can you add the output ofwhich sudo
as well
– CyberJacob
Jan 23 '18 at 16:04
4
Why do you even have a/usr/local/bin/sudo
?
– steeldriver
Jan 23 '18 at 16:04
/usr/local/bin/sudo
yes i have and that also throwing the set uid error
– muthukumar
Jan 23 '18 at 16:10
|
show 1 more comment
1
Please edit your question add the full output ofls -l /usr/local/bin/sudo
– Andy Dalton
Jan 23 '18 at 15:53
i have updated above question withls -l sudo
outupt @AndyDalton
– muthukumar
Jan 23 '18 at 16:02
1
Can you add the output ofwhich sudo
as well
– CyberJacob
Jan 23 '18 at 16:04
4
Why do you even have a/usr/local/bin/sudo
?
– steeldriver
Jan 23 '18 at 16:04
/usr/local/bin/sudo
yes i have and that also throwing the set uid error
– muthukumar
Jan 23 '18 at 16:10
1
1
Please edit your question add the full output of
ls -l /usr/local/bin/sudo
– Andy Dalton
Jan 23 '18 at 15:53
Please edit your question add the full output of
ls -l /usr/local/bin/sudo
– Andy Dalton
Jan 23 '18 at 15:53
i have updated above question with
ls -l sudo
outupt @AndyDalton– muthukumar
Jan 23 '18 at 16:02
i have updated above question with
ls -l sudo
outupt @AndyDalton– muthukumar
Jan 23 '18 at 16:02
1
1
Can you add the output of
which sudo
as well– CyberJacob
Jan 23 '18 at 16:04
Can you add the output of
which sudo
as well– CyberJacob
Jan 23 '18 at 16:04
4
4
Why do you even have a
/usr/local/bin/sudo
?– steeldriver
Jan 23 '18 at 16:04
Why do you even have a
/usr/local/bin/sudo
?– steeldriver
Jan 23 '18 at 16:04
/usr/local/bin/sudo
yes i have and that also throwing the set uid error– muthukumar
Jan 23 '18 at 16:10
/usr/local/bin/sudo
yes i have and that also throwing the set uid error– muthukumar
Jan 23 '18 at 16:10
|
show 1 more comment
2 Answers
2
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{,2}
and then tell your shell about it:
hash -r
That will restore the sudo
functionality you’re used to.
now it throws me an error -bash:/usr/local/bin/sudo:
No such file or directory
– muthukumar
Jan 23 '18 at 16:13
2
Did you runhash -r
? Do you have an alias set?
– Stephen Kitt
Jan 23 '18 at 16:14
2
What is yourPATH
?
– DopeGhoti
Jan 23 '18 at 16:16
yes i have runhash -r
--/usr/bin/sudo
--> working properly with sudo command
– muthukumar
Jan 23 '18 at 16:16
what doeswhich sudo
show?
– mik
Jan 23 '18 at 22:16
|
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:
mount -o remount,rw /
# remounts disks in read write mode
mount --all
chown roo:root /usr/bin/sudo
# return ownership
chmod 4755 /usr/bin/sudo
# fix permissions
reboot
This solved my problems once I logged back in as a user.
add a comment |
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
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{,2}
and then tell your shell about it:
hash -r
That will restore the sudo
functionality you’re used to.
now it throws me an error -bash:/usr/local/bin/sudo:
No such file or directory
– muthukumar
Jan 23 '18 at 16:13
2
Did you runhash -r
? Do you have an alias set?
– Stephen Kitt
Jan 23 '18 at 16:14
2
What is yourPATH
?
– DopeGhoti
Jan 23 '18 at 16:16
yes i have runhash -r
--/usr/bin/sudo
--> working properly with sudo command
– muthukumar
Jan 23 '18 at 16:16
what doeswhich sudo
show?
– mik
Jan 23 '18 at 22:16
|
show 5 more comments
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.
now it throws me an error -bash:/usr/local/bin/sudo:
No such file or directory
– muthukumar
Jan 23 '18 at 16:13
2
Did you runhash -r
? Do you have an alias set?
– Stephen Kitt
Jan 23 '18 at 16:14
2
What is yourPATH
?
– DopeGhoti
Jan 23 '18 at 16:16
yes i have runhash -r
--/usr/bin/sudo
--> working properly with sudo command
– muthukumar
Jan 23 '18 at 16:16
what doeswhich sudo
show?
– mik
Jan 23 '18 at 22:16
|
show 5 more comments
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.
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.
answered Jan 23 '18 at 16:07
Stephen KittStephen Kitt
202k27 gold badges479 silver badges549 bronze badges
202k27 gold badges479 silver badges549 bronze badges
now it throws me an error -bash:/usr/local/bin/sudo:
No such file or directory
– muthukumar
Jan 23 '18 at 16:13
2
Did you runhash -r
? Do you have an alias set?
– Stephen Kitt
Jan 23 '18 at 16:14
2
What is yourPATH
?
– DopeGhoti
Jan 23 '18 at 16:16
yes i have runhash -r
--/usr/bin/sudo
--> working properly with sudo command
– muthukumar
Jan 23 '18 at 16:16
what doeswhich sudo
show?
– mik
Jan 23 '18 at 22:16
|
show 5 more comments
now it throws me an error -bash:/usr/local/bin/sudo:
No such file or directory
– muthukumar
Jan 23 '18 at 16:13
2
Did you runhash -r
? Do you have an alias set?
– Stephen Kitt
Jan 23 '18 at 16:14
2
What is yourPATH
?
– DopeGhoti
Jan 23 '18 at 16:16
yes i have runhash -r
--/usr/bin/sudo
--> working properly with sudo command
– muthukumar
Jan 23 '18 at 16:16
what doeswhich sudo
show?
– mik
Jan 23 '18 at 22:16
now it throws me an error -bash:
/usr/local/bin/sudo:
No such file or directory– muthukumar
Jan 23 '18 at 16:13
now it throws me an error -bash:
/usr/local/bin/sudo:
No such file or directory– muthukumar
Jan 23 '18 at 16:13
2
2
Did you run
hash -r
? Do you have an alias set?– Stephen Kitt
Jan 23 '18 at 16:14
Did you run
hash -r
? Do you have an alias set?– Stephen Kitt
Jan 23 '18 at 16:14
2
2
What is your
PATH
?– DopeGhoti
Jan 23 '18 at 16:16
What is your
PATH
?– DopeGhoti
Jan 23 '18 at 16:16
yes i have run
hash -r
-- /usr/bin/sudo
--> working properly with sudo command– muthukumar
Jan 23 '18 at 16:16
yes i have run
hash -r
-- /usr/bin/sudo
--> working properly with sudo command– muthukumar
Jan 23 '18 at 16:16
what does
which sudo
show?– mik
Jan 23 '18 at 22:16
what does
which sudo
show?– mik
Jan 23 '18 at 22:16
|
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:
mount -o remount,rw /
# remounts disks in read write mode
mount --all
chown roo:root /usr/bin/sudo
# return ownership
chmod 4755 /usr/bin/sudo
# fix permissions
reboot
This solved my problems once I logged back in as a user.
add a comment |
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:
mount -o remount,rw /
# remounts disks in read write mode
mount --all
chown roo:root /usr/bin/sudo
# return ownership
chmod 4755 /usr/bin/sudo
# fix permissions
reboot
This solved my problems once I logged back in as a user.
add a comment |
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:
mount -o remount,rw /
# remounts disks in read write mode
mount --all
chown roo:root /usr/bin/sudo
# return ownership
chmod 4755 /usr/bin/sudo
# fix permissions
reboot
This solved my problems once I logged back in as a user.
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:
mount -o remount,rw /
# remounts disks in read write mode
mount --all
chown roo:root /usr/bin/sudo
# return ownership
chmod 4755 /usr/bin/sudo
# fix permissions
reboot
This solved my problems once I logged back in as a user.
answered 1 hour ago
Drew J.Drew J.
12 bronze badges
12 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Please edit your question add the full output of
ls -l /usr/local/bin/sudo
– Andy Dalton
Jan 23 '18 at 15:53
i have updated above question with
ls -l sudo
outupt @AndyDalton– muthukumar
Jan 23 '18 at 16:02
1
Can you add the output of
which sudo
as well– CyberJacob
Jan 23 '18 at 16:04
4
Why do you even have a
/usr/local/bin/sudo
?– steeldriver
Jan 23 '18 at 16:04
/usr/local/bin/sudo
yes i have and that also throwing the set uid error– muthukumar
Jan 23 '18 at 16:10