How to fix sudoer errors accidentally

Source: Internet
Author: User

Originally, I felt that every time

Sudo command

It is too troublesome to enter the password, so I want to remove the password. Well, how can we remove it? Naturally, it's a change.

/Etc/sudoers

But accidentally modified the error. The result is a tragedy: because it is in non-root user mode,

Sudo Vim sudoers

Error

>>>/Etc/sudoers: syntax error near line 23 <sudo:/etc/sudoers contains a parsing error near line 23rd. sudo: no valid sudoers sources found, quittingsudo: unable to initialize policy plug-in

At the same time

Sudo-I

You cannot switch to the root node, but you can only seek help from the omnipotent Google node by using the following command:

Pkexec mongodo

You can edit sudoers. OK to solve the problem!

How to fix sudoer errors accidentally

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.