Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I have added a new user to the sudoers file in the right place on CENTOS 6.9 and restarted too, when I SSH as the user it logs in but still says user is not in sudoers file when it blatantly is and also is a member of the wheel group too.
How do I fix this please, the user is there under root in the sudoers file with the same access levels.
How about system15 instead of System15, if that is username to whom you want to give full sudo privs? You know that usernames should always be lower case?
wheel is still commented out in that image of the sudoers file post #4
# %wheel
should be
%wheel
Code:
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
and the user added to the wheel group, log out log in to activate user if your in that same user under su modding the file.
you can use visudo if you know the commands to edit - save - exit or nano if you know what you are doing they both work to edit your sudoers file.
Any text editor actually, as long as root is using it so it can be saved. Just do not be adding or removing anything if you are not sure what you are doing else you may lock yourself out of your systems capabilities to run anything needing root - then its time for damage control.
which needs a separate means to gain entry into that system with root privileges to fix it.
you might want to back up your original file first before proceeding.
Code:
#cp -v sudoers sudoers.org
If by chance it is that
System15 ALL=(ALL) ALL
adding this to my system after creating that user it worked perfectly all I needed to do was use the password for same said user.
Code:
surooterdude ALL=(ALL) ALL
you might want to check to be sure the case for the username and the one in the sudoers file are exactly the same.
You do not need to add user to the wheel group, nor any other group to grant him full sudo privs, though it is sure better and more clean way of doing it. All you do need to give him full sudo privs is:
Code:
user_name ALL=(ALL) ALL
line in sudoers file, or any file under /etc/sudoers.d/, as long as your sudoers file has #includedir /etc/sudoers.d directive in it. And all files under /etc/sudoers.d/ should have 0440 permission.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.