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