Modified the/USR directory permissions under Ubuntu, resulting in the inability to use the sudo command to repair-----Reprint

Source: Internet
Author: User

The following error was reported when Sudo was first run

Sudo:must be setuid root, so the Internet to find a solution, the search came out of the way to solve

Ls-l/usr/bin/sudo
Chown Root:root/usr/bin/sudo
chmod 4755/usr/bin/sudo

Reboot

I tested the conclusion that this method is feasible, but not clear, need to have root execution permissions , if not to log in as root,

You need to enter into the recovery mode, the way to enter: In the process of booting the shift or ESC, I ubuntu12.04 the system is the SHIFT key.

Then select the second startup item in the Grub menu, go to the next select list interface, then select one of the root words, press ENTER,

At this point, you have entered the character interface with the root permission . Enter the above command , if the problem has been resolved, it is done, you can skip the following content

I have a new problem, in this note interface to enter the above

Chown Root:root/usr/bin/sudo

chmod 4755/usr/bin/sudo, execution fails,

Hint Read-only file system, and then go online to find, find n long, measured a lot of methods, finally found a re-mount/ directory and specify its read and write permissions of the command . The command is as follows:

Mount-o REMOUNT,RW/

Website: http://www.linuxquestions.org/questions/Linux-general-1/ cannot-edit-fstab-in-recovery-mode-filesystem-is-read-only-540195/

And then enter the above command

Chown Root:root/usr/bin/sudo

chmod 4755/usr/bin/sudo

Yes, the execution is successful. Enter Ls-l/usr/bin/sudo to verify that the changes were successful, and the results show that the changes have been made.

Thought the problem solved, happy input reboot command restart.

The sad scene appeared, the input sudo still has a problem,

Hint "sudo:/usr/lib/sudo/sudoers.so must is only being writable by owner" and has to start Google again,

Find a way to say the input command : (Of course, to enter the recovery mode)

pkexec chmod Go-w /usr/lib/sudo/sudoers.soThe website is as follows: http://blog.csdn.NET/huangmou37/article/details/8259724

But when I enter this command , execution fails and I forget to prompt for any error messages.

The reason for the problem is that they have incorrectly modified the/USR directory under all permissions , then the above command is not changed back to not enough permissions

Then I think of the permissions to modify The/usr/lib/sudo/sudoers.so file, enter the command

chmod 4755 /usr/lib/sudo/sudoers.so

Then reboot, enter the sudo command to ....

Modified the/USR directory permissions under Ubuntu, resulting in the inability to use the sudo command to repair-----Reprint

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.