Added user to Sudoers Not Working
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. Thanks Matt |
Can you post the entry made in the sudoers file here?
|
Welcome to LQ Matt!
wrt: Quote:
used in the edit as well? Did the "sudoer" assigned log out and back in ? Please let us know. |
1 Attachment(s)
I followed this walkthrough
https://wiki.centos.org/TipsAndTricks/BecomingRoot Attached is the image I added them directly to the sudoers file, saved and restarted to test. |
Quote:
Can you provide the results when your new user runs the command Code:
sudo -l Thank you. |
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 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 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 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 |
A nice feature of visudo is that it checks syntax when you close it.
|
All times are GMT -5. The time now is 01:27 PM. |