Tuesday, 22 March 2016

Fix Linux Sudo Error User “Is Not In The Sudoers File”

The Linux Tutorial Shows You in Easy Steps How-to Solve the Sudo command Unavailability and Adding an User to the Sudoers Group on GNU/Linux Systems.

This correspond to Solve “User is Not in the Sudoers File” Issue!

In the case of Installations in the event that the problem can Not be Solved you can often proceed with a Local Installation into your Home directory.

1. Ways to Get the SuperUser Powers
On Ubuntu Based OSs Try Again:

sudo su

On Non-Ubuntu Based OSs:

su -

Else Try to Switch to Another User with SuperUser/Admin Privileges!

su [myUserSuper]

In some Distros May Try directly with:

su root

Then You’ll always Need the Password of the Admin/SuperUser Account…

2. Edit the sudoers File

sudo visudo

Now on GNU/Linux Distros for visudo there are two Default Shell editors:
  • nano
  • vi

In Case of the vi Editor then Hit ‘i’ to Start Editing

3. Enabling sudo Command for an User
Just Below to the line containing:



[myBeautifulUser] ALL=(ALL:ALL) ALL

Last Save Changes & Exit:
On nano Just Ctrl+x and Confirm
On vi First Hit Esc and then ‘:wq‘ ;)

You Dispose Now of a Beautiful sudo User :)

1 comment:

  1. I use windows, so this probably won't help me in anyway, but lots of people who use Linux could benefit from this information. Great work!