Sudo: must be setuid root problem solution

Source: Internet
Author: User

You can use the sudo chmod-R 777/usr command to modify the owner of the usr file. As a result, the sudo: must be setuid root problem occurs, that is, the sudo command cannot be used. The methods described on the Internet are almost the same. The following two commands are used:

Chown root: root/usr/bin/sudo

Chmod 4755/usr/bin/sudo

But in fact, the above two commands in the current user system cannot achieve the desired purpose. The above two commands must be executed under the root user to apply them. So, how to access the root user? The sudo passwd root method introduced on the internet is definitely not feasible, because the sudo command has already encountered an error and you can only log on to the root client using another method, the recovery mode of Ubuntu is used here.

First, enter the recovery mode. Some say that you press the ESC key at startup, and some say that you press the shift key at startup. You can try it. I use the shift key to enter the recovery mode. Note: you cannot successfully enter the recovery mode at one time. You can try multiple times;

After pressing enter, select the column related to root in the displayed interface (remember: root, not newroot), and enter the root user system;

At this point, you have successfully entered the root user system and executed

Chown root: root/usr/bin/sudo

Chmod 4755 usr/bin/sudo

Shut down and restart. The problem is solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.