User is not in the sudoers file in CentOS

User is not in the sudoers file in CentOS

I got this above error while trying to do sudo user. see Image – 1

Image shows login su

CentOS 6 does not add users to sudoers by default and nor does it allow group wheel sudo access.

How to configure it manually

Step 1

Login with root user or type su – then type root user password.

Step 2

open vi etc/sudoers

Step 3

Add your userid to the list or uncomment the lines allowing group wheel

Step 4

If you uncomment the wheel lines then you need to add your userid to the group using

e.g. usermod -a -G wheel myuser then logout and back in again to pick up the new group membership.

See the Image – 2 for better understanding.

Edit sudoers file

Reference – https://serverfault.com/questions/854623/centos-7-adding-a-user-to-sudoers-group-still-is-not-in-the-sudoers-file-w

You may also like:-

How to add Multiple TimeZone Clock in Windows7

Without sudo login to mysql server in Ubuntu 18

Creating Local Yum Repository on Red Hat Enterprise linux 6

Install and configure Jasper Report Server on Ubuntu Server

Product Review: Stellar Phoenix SQL Database Repair

Stellar OST to PST converter

Categories
Linux

I am a proud Indian, proud father, a blogger, Being in a profession as System administrator, my passion is troubleshooting computer issues, I do like sharing solutions through blogging making videos of solving issues.
No Comment

Leave a Reply

*

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

RELATED BY