Restore sudo privileges

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











up vote
5
down vote

favorite
3












Trying to install tor-browser, I screwed up my sudo privileges when I tried to take ownership of a directory. Now I get a message:



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


every time I want to use sudo.



Running Mint 17.










share|improve this question



















  • 4




    It's not your sudo privilege. Depending on the command you ran, you broke part or all of the ownership/permissions of your system files. What command did you run ?
    – Leiaz
    Mar 2 '15 at 12:07










  • Of course, you are correct - my terminology sucks. I wanted to run the command:sudo chown $USER -Rv /usr/bin/tor-browser/, but instead I typed: sudo chown $USER -Rv /usr/bin/ tor-browser/ - and then the ownership/permission went out the door...
    – Merciless
    Mar 2 '15 at 12:29







  • 1




    First, a directory owned by your regular user in /usr/bin is a really weird idea... For the current problem, the files in /usr/bin should be owned by root, but a dozen or so have also lost their setuid bit like sudo. The simplest would be to use the package manager. I'm finding apt-get --reinstall install but there may be something more fine-grained ...
    – Leiaz
    Mar 2 '15 at 14:06














up vote
5
down vote

favorite
3












Trying to install tor-browser, I screwed up my sudo privileges when I tried to take ownership of a directory. Now I get a message:



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


every time I want to use sudo.



Running Mint 17.










share|improve this question



















  • 4




    It's not your sudo privilege. Depending on the command you ran, you broke part or all of the ownership/permissions of your system files. What command did you run ?
    – Leiaz
    Mar 2 '15 at 12:07










  • Of course, you are correct - my terminology sucks. I wanted to run the command:sudo chown $USER -Rv /usr/bin/tor-browser/, but instead I typed: sudo chown $USER -Rv /usr/bin/ tor-browser/ - and then the ownership/permission went out the door...
    – Merciless
    Mar 2 '15 at 12:29







  • 1




    First, a directory owned by your regular user in /usr/bin is a really weird idea... For the current problem, the files in /usr/bin should be owned by root, but a dozen or so have also lost their setuid bit like sudo. The simplest would be to use the package manager. I'm finding apt-get --reinstall install but there may be something more fine-grained ...
    – Leiaz
    Mar 2 '15 at 14:06












up vote
5
down vote

favorite
3









up vote
5
down vote

favorite
3






3





Trying to install tor-browser, I screwed up my sudo privileges when I tried to take ownership of a directory. Now I get a message:



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


every time I want to use sudo.



Running Mint 17.










share|improve this question















Trying to install tor-browser, I screwed up my sudo privileges when I tried to take ownership of a directory. Now I get a message:



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


every time I want to use sudo.



Running Mint 17.







linux sudo






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 at 20:33









Rui F Ribeiro

38.3k1476127




38.3k1476127










asked Mar 2 '15 at 11:55









Merciless

28114




28114







  • 4




    It's not your sudo privilege. Depending on the command you ran, you broke part or all of the ownership/permissions of your system files. What command did you run ?
    – Leiaz
    Mar 2 '15 at 12:07










  • Of course, you are correct - my terminology sucks. I wanted to run the command:sudo chown $USER -Rv /usr/bin/tor-browser/, but instead I typed: sudo chown $USER -Rv /usr/bin/ tor-browser/ - and then the ownership/permission went out the door...
    – Merciless
    Mar 2 '15 at 12:29







  • 1




    First, a directory owned by your regular user in /usr/bin is a really weird idea... For the current problem, the files in /usr/bin should be owned by root, but a dozen or so have also lost their setuid bit like sudo. The simplest would be to use the package manager. I'm finding apt-get --reinstall install but there may be something more fine-grained ...
    – Leiaz
    Mar 2 '15 at 14:06












  • 4




    It's not your sudo privilege. Depending on the command you ran, you broke part or all of the ownership/permissions of your system files. What command did you run ?
    – Leiaz
    Mar 2 '15 at 12:07










  • Of course, you are correct - my terminology sucks. I wanted to run the command:sudo chown $USER -Rv /usr/bin/tor-browser/, but instead I typed: sudo chown $USER -Rv /usr/bin/ tor-browser/ - and then the ownership/permission went out the door...
    – Merciless
    Mar 2 '15 at 12:29







  • 1




    First, a directory owned by your regular user in /usr/bin is a really weird idea... For the current problem, the files in /usr/bin should be owned by root, but a dozen or so have also lost their setuid bit like sudo. The simplest would be to use the package manager. I'm finding apt-get --reinstall install but there may be something more fine-grained ...
    – Leiaz
    Mar 2 '15 at 14:06







4




4




It's not your sudo privilege. Depending on the command you ran, you broke part or all of the ownership/permissions of your system files. What command did you run ?
– Leiaz
Mar 2 '15 at 12:07




It's not your sudo privilege. Depending on the command you ran, you broke part or all of the ownership/permissions of your system files. What command did you run ?
– Leiaz
Mar 2 '15 at 12:07












Of course, you are correct - my terminology sucks. I wanted to run the command:sudo chown $USER -Rv /usr/bin/tor-browser/, but instead I typed: sudo chown $USER -Rv /usr/bin/ tor-browser/ - and then the ownership/permission went out the door...
– Merciless
Mar 2 '15 at 12:29





Of course, you are correct - my terminology sucks. I wanted to run the command:sudo chown $USER -Rv /usr/bin/tor-browser/, but instead I typed: sudo chown $USER -Rv /usr/bin/ tor-browser/ - and then the ownership/permission went out the door...
– Merciless
Mar 2 '15 at 12:29





1




1




First, a directory owned by your regular user in /usr/bin is a really weird idea... For the current problem, the files in /usr/bin should be owned by root, but a dozen or so have also lost their setuid bit like sudo. The simplest would be to use the package manager. I'm finding apt-get --reinstall install but there may be something more fine-grained ...
– Leiaz
Mar 2 '15 at 14:06




First, a directory owned by your regular user in /usr/bin is a really weird idea... For the current problem, the files in /usr/bin should be owned by root, but a dozen or so have also lost their setuid bit like sudo. The simplest would be to use the package manager. I'm finding apt-get --reinstall install but there may be something more fine-grained ...
– Leiaz
Mar 2 '15 at 14:06










1 Answer
1






active

oldest

votes

















up vote
9
down vote



accepted










First restart the pc, press SHIFT key while Ubuntu is booting.



This will bring you up the boot menu.



Go to Advanced Options.



Select your OS version in (recovery mode), and press Enter Key.



example : Ubuntu 14.04 (recovery mode)



It will bring you up another screen. Now select “Drop to root shell prompt” and press Enter.



It will load a command line at the bottom of the screen.



Now run each of the following commands.



# mount -o remount,rw /
# mount -a
# chown root:root /usr/bin/sudo
# chmod 4755 /usr/bin/sudo
# init 6


This will fix your sudo Above error.






share|improve this answer
















  • 4




    This will only fix sudo. If the OP was trying to change permission of a directory, there is certainly more to fix.
    – Leiaz
    Mar 2 '15 at 12:18










  • Thank you very much - it worked like a charm. There was a time that I was fluent in DOS, up to V 6, as a matter of fact, but the Win GUI made me lazy. This is a new challenge... Thanks for the prompt help.
    – Merciless
    Mar 2 '15 at 12:33










  • That is a marvelous answer. It saved a lifetime for me. after all struggling and wrong answers I found on internet, This actually solved the issue
    – Farzad YZ
    Nov 26 '15 at 8:26











  • Please do not do this, this will only partially fix the issue. You may have surprises in the future.
    – obo
    Apr 19 '17 at 9:09










  • Then you provide the correct solution
    – Babin Lonston
    Apr 19 '17 at 18:10










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: 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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f187672%2frestore-sudo-privileges%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
9
down vote



accepted










First restart the pc, press SHIFT key while Ubuntu is booting.



This will bring you up the boot menu.



Go to Advanced Options.



Select your OS version in (recovery mode), and press Enter Key.



example : Ubuntu 14.04 (recovery mode)



It will bring you up another screen. Now select “Drop to root shell prompt” and press Enter.



It will load a command line at the bottom of the screen.



Now run each of the following commands.



# mount -o remount,rw /
# mount -a
# chown root:root /usr/bin/sudo
# chmod 4755 /usr/bin/sudo
# init 6


This will fix your sudo Above error.






share|improve this answer
















  • 4




    This will only fix sudo. If the OP was trying to change permission of a directory, there is certainly more to fix.
    – Leiaz
    Mar 2 '15 at 12:18










  • Thank you very much - it worked like a charm. There was a time that I was fluent in DOS, up to V 6, as a matter of fact, but the Win GUI made me lazy. This is a new challenge... Thanks for the prompt help.
    – Merciless
    Mar 2 '15 at 12:33










  • That is a marvelous answer. It saved a lifetime for me. after all struggling and wrong answers I found on internet, This actually solved the issue
    – Farzad YZ
    Nov 26 '15 at 8:26











  • Please do not do this, this will only partially fix the issue. You may have surprises in the future.
    – obo
    Apr 19 '17 at 9:09










  • Then you provide the correct solution
    – Babin Lonston
    Apr 19 '17 at 18:10














up vote
9
down vote



accepted










First restart the pc, press SHIFT key while Ubuntu is booting.



This will bring you up the boot menu.



Go to Advanced Options.



Select your OS version in (recovery mode), and press Enter Key.



example : Ubuntu 14.04 (recovery mode)



It will bring you up another screen. Now select “Drop to root shell prompt” and press Enter.



It will load a command line at the bottom of the screen.



Now run each of the following commands.



# mount -o remount,rw /
# mount -a
# chown root:root /usr/bin/sudo
# chmod 4755 /usr/bin/sudo
# init 6


This will fix your sudo Above error.






share|improve this answer
















  • 4




    This will only fix sudo. If the OP was trying to change permission of a directory, there is certainly more to fix.
    – Leiaz
    Mar 2 '15 at 12:18










  • Thank you very much - it worked like a charm. There was a time that I was fluent in DOS, up to V 6, as a matter of fact, but the Win GUI made me lazy. This is a new challenge... Thanks for the prompt help.
    – Merciless
    Mar 2 '15 at 12:33










  • That is a marvelous answer. It saved a lifetime for me. after all struggling and wrong answers I found on internet, This actually solved the issue
    – Farzad YZ
    Nov 26 '15 at 8:26











  • Please do not do this, this will only partially fix the issue. You may have surprises in the future.
    – obo
    Apr 19 '17 at 9:09










  • Then you provide the correct solution
    – Babin Lonston
    Apr 19 '17 at 18:10












up vote
9
down vote



accepted







up vote
9
down vote



accepted






First restart the pc, press SHIFT key while Ubuntu is booting.



This will bring you up the boot menu.



Go to Advanced Options.



Select your OS version in (recovery mode), and press Enter Key.



example : Ubuntu 14.04 (recovery mode)



It will bring you up another screen. Now select “Drop to root shell prompt” and press Enter.



It will load a command line at the bottom of the screen.



Now run each of the following commands.



# mount -o remount,rw /
# mount -a
# chown root:root /usr/bin/sudo
# chmod 4755 /usr/bin/sudo
# init 6


This will fix your sudo Above error.






share|improve this answer












First restart the pc, press SHIFT key while Ubuntu is booting.



This will bring you up the boot menu.



Go to Advanced Options.



Select your OS version in (recovery mode), and press Enter Key.



example : Ubuntu 14.04 (recovery mode)



It will bring you up another screen. Now select “Drop to root shell prompt” and press Enter.



It will load a command line at the bottom of the screen.



Now run each of the following commands.



# mount -o remount,rw /
# mount -a
# chown root:root /usr/bin/sudo
# chmod 4755 /usr/bin/sudo
# init 6


This will fix your sudo Above error.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 2 '15 at 12:03









Babin Lonston

1,97111020




1,97111020







  • 4




    This will only fix sudo. If the OP was trying to change permission of a directory, there is certainly more to fix.
    – Leiaz
    Mar 2 '15 at 12:18










  • Thank you very much - it worked like a charm. There was a time that I was fluent in DOS, up to V 6, as a matter of fact, but the Win GUI made me lazy. This is a new challenge... Thanks for the prompt help.
    – Merciless
    Mar 2 '15 at 12:33










  • That is a marvelous answer. It saved a lifetime for me. after all struggling and wrong answers I found on internet, This actually solved the issue
    – Farzad YZ
    Nov 26 '15 at 8:26











  • Please do not do this, this will only partially fix the issue. You may have surprises in the future.
    – obo
    Apr 19 '17 at 9:09










  • Then you provide the correct solution
    – Babin Lonston
    Apr 19 '17 at 18:10












  • 4




    This will only fix sudo. If the OP was trying to change permission of a directory, there is certainly more to fix.
    – Leiaz
    Mar 2 '15 at 12:18










  • Thank you very much - it worked like a charm. There was a time that I was fluent in DOS, up to V 6, as a matter of fact, but the Win GUI made me lazy. This is a new challenge... Thanks for the prompt help.
    – Merciless
    Mar 2 '15 at 12:33










  • That is a marvelous answer. It saved a lifetime for me. after all struggling and wrong answers I found on internet, This actually solved the issue
    – Farzad YZ
    Nov 26 '15 at 8:26











  • Please do not do this, this will only partially fix the issue. You may have surprises in the future.
    – obo
    Apr 19 '17 at 9:09










  • Then you provide the correct solution
    – Babin Lonston
    Apr 19 '17 at 18:10







4




4




This will only fix sudo. If the OP was trying to change permission of a directory, there is certainly more to fix.
– Leiaz
Mar 2 '15 at 12:18




This will only fix sudo. If the OP was trying to change permission of a directory, there is certainly more to fix.
– Leiaz
Mar 2 '15 at 12:18












Thank you very much - it worked like a charm. There was a time that I was fluent in DOS, up to V 6, as a matter of fact, but the Win GUI made me lazy. This is a new challenge... Thanks for the prompt help.
– Merciless
Mar 2 '15 at 12:33




Thank you very much - it worked like a charm. There was a time that I was fluent in DOS, up to V 6, as a matter of fact, but the Win GUI made me lazy. This is a new challenge... Thanks for the prompt help.
– Merciless
Mar 2 '15 at 12:33












That is a marvelous answer. It saved a lifetime for me. after all struggling and wrong answers I found on internet, This actually solved the issue
– Farzad YZ
Nov 26 '15 at 8:26





That is a marvelous answer. It saved a lifetime for me. after all struggling and wrong answers I found on internet, This actually solved the issue
– Farzad YZ
Nov 26 '15 at 8:26













Please do not do this, this will only partially fix the issue. You may have surprises in the future.
– obo
Apr 19 '17 at 9:09




Please do not do this, this will only partially fix the issue. You may have surprises in the future.
– obo
Apr 19 '17 at 9:09












Then you provide the correct solution
– Babin Lonston
Apr 19 '17 at 18:10




Then you provide the correct solution
– Babin Lonston
Apr 19 '17 at 18:10

















draft saved

draft discarded
















































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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f187672%2frestore-sudo-privileges%23new-answer', 'question_page');

);

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






Popular posts from this blog

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

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay