Sudo is not working on my centos7.3
Hello guys
I have paid a considerable time on my centos7 with sudo,I added local user test to /etc/sudoers via visudo as follows Code:
## Next comes the main part: which users can run what software on Quote:
Quote:
Quote:
|
It works for me. Have you tried logging out and then back in.
|
"test" is a command so your system might be confused with a user by that name.
Try changing the username to "testuser". The wheel group is not required for RHEL/CentOS like it is for some other distros. Although you can setup grants by group the fact you did it for a specific user means he doesn't need to be in wheel. Also you mention /etc/sudoers which makes it sound as if you did a direct edit of that file. The appropriate way to edit the file is using the "visudo" command. It will check for syntax errors before you save. I'd suggest doing a visudo then a write to see if it complains of any issues. Finally RHEL/CentOS have SELinux. If that is enabled and enforcing you may have modified context on /etc/sudoers if you did direct edit. You should check /etc/sudoers if you are in fact enforcing in SELinux. |
Quote:
|
Quote:
thanks |
is there anything else in that /etc/sudoers file?
|
1 Attachment(s)
Quote:
|
visudo will check syntax but doesn't check SELinux status. Did you check whether you have that enabled and enforcing? If it is did you check the SELinux context of /etc/sudoers?
Also did you verify permissions of /etc itself and /etc/sudoers? If you look in /var/log/secure does it show any more detail about the failure? |
In your sudoers file can you verify the following are actually each a single line rather than two lines as appears when I viewed your attachment:
Quote:
Quote:
Quote:
Quote:
|
and what is in /etc/sudoers.d/arkgrp-users ?
|
Quote:
|
see post #5, it was parsed. I don't know why, but visudo -c processed that.
And the sudoers file has a relatively strange behaviour: the rules are order dependent, and probably the users are disabled somewhere.... probably need to set logging to catch it. |
Quote:
Code:
[root@ark-centos-smb4 ~]# sestatus Quote:
Code:
[root@ark-centos-smb4 /]# ls -laZ / | grep etc Quote:
Code:
[usera@ark-centos-smb4 ~]$ sudo ls |
Quote:
|
Quote:
Code:
[root@ark-centos-smb4 /]# more /etc/sudoers.d/arkgrp-users |
All times are GMT -5. The time now is 09:09 AM. |