Ubuntu server sudo: Must be setuid root perfect solution.

Source: Internet
Author: User

1.StartPerform the recovery mode by shift or ESC


2. Select the root command line mode.


3. Execute

# Mount-O remount, RW/

This is very important because many of the materials found on the Internet are incomplete and cannot be restored successfully.

Because the recovery mode is mounted in read-only mode by default, if this statement is not executed, it will be reported


4. Execute

# Chown root: Root/usr/bin/sudo
# Chmod 4755/usr/bin/sudo

5. Run after restart

Sudo ls

Report

# Sudo:/usr/lib/sudo/sudoers. So must be owned by UID 0
# Sudo: Fatal error, unable to load plugins

6. Restart to restore the root mode.

Run

# Chown root/usr/lib/sudo/sudoers. So

Restart to solve the problem.




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.