User is not in the sudoers file. This incident will be reported
Sometimes we use sudo command and see the above ERROR.
It means that the user as whom we have logged in and are trying to run the command "sudo" does not have the permission to do so.
Only the users listed in /etc/sudoers have the permission to use the command "sudo".
To give the sudo permission to a user we need to add the user to the file /etc/sudoers file.
Open the file /etc/sudoers as root.
# sudo vim /etc/sudoers
And then add the following line into the sudoers file:
# username ALL = (ALL) ALL
Save and quit:
# wq!
Now, sudo should work properly.
No comments:
Post a Comment