Ubuntu appears in the sudoers file of username is not. This incident would be a reported error

Source: Internet
Author: User

Reference URL http://www.maketecheasier.com/fixing-sudo-error-in-ubuntu/

Use environment under Ubuntu Linux system:

When studying bird's private cuisine, the following commands are used

<span style= "FONT-SIZE:18PX;" >usermod-g Users Username</span>

Username is your own user name.

Because the-a parameter was not used to cause my users to be split into the users user group and the original user group was reset, only the users user group was left

The sudo command cannot be used because there is no sudo user group.

Workaround: Reboot the system under the X-windows graphical interface

Then go to the Grub interface and Select the selected item

Choose fsck and wait about 30 seconds

Click the root key to enter the command line under root

On the command line, enter

<span style= "FONT-SIZE:18PX;" >usermod-a-G sudo usernameusermod-a-G adm username</span>

Some systems are admin, but my system is ADM, but I read the content in the sudoers file is admin,

There is no admin in my/etc/group, so I add ADM is unable to let my users use sudo, so still want to join Sudo user group

<span style= "FONT-SIZE:18PX;" >## This file must is edited with the ' Visudo ' command as root.## please consider adding local content in/etc/sudoers. D/instead of# directly modifying this file.## see the Mans page for details on how to write a sudoers file. #Defaults        E Nv_reset # Host alias Specification # User alias Specification # CMND alias specification # User Privilege Specificationro OT    all= (all:all) All # Members of the admin group could gain root privileges%admin all= (All) All # Allow members of Grou P sudo to execute any command%sudo   all= (all:all) all #includedir/etc/sudoers.d</span>

Then click Resume to restart the system

After rebooting, you can enter root.

If you can directly access the root user directly with the Su-command, you can directly modify the/etc/sudoers file

and change the user group to which the username user belongs.




Ubuntu appears in the sudoers file of username is not. This incident would be a reported error

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.