Page 1 of 1

Sudo is not working on my centos7.3

Posted: 2017/08/16 08:05:35
by xq10907
Hello guys

I post the problem in general support but could not solve the issue,so switch to this forum for additional help :)
I added local user test to /etc/sudoers via visudo as follows

Code: Select all

## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
test    ALL=(ALL)       ALL

then su to test,run command as root get error says the user in not in sudoers file,please give some suggestion,thanks

Code: Select all

[root@ark-centos-smb4 ~]# su - test
Last login: Tue Aug  8 01:03:48 PDT 2017 on pts/0
[test@ark-centos-smb4 ~]$ sudo ls /root/
[sudo] password for test:
test is not in the sudoers file.  This incident will be reported.

Re: Sudo is not working on my centos7.3

Posted: 2017/08/16 08:14:11
by avij
Please don't make multiple topics about the same issue. Further replies should be posted in the original topic. Closing this topic.