Restore sudo privileges
Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
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
add a comment |
up vote
5
down vote
favorite
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
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 findingapt-get --reinstall install
but there may be something more fine-grained ...
– Leiaz
Mar 2 '15 at 14:06
add a comment |
up vote
5
down vote
favorite
up vote
5
down vote
favorite
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
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
linux sudo
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 findingapt-get --reinstall install
but there may be something more fine-grained ...
– Leiaz
Mar 2 '15 at 14:06
add a comment |
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 findingapt-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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
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.
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.
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%2f187672%2frestore-sudo-privileges%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
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