User is not in the sudoers file in CentOS

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

User is not in the sudoers file in CentOS

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.

User is not in the sudoers file in CentOS

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

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

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