Sudo is not working on my centos7.3

Support for security such as Firewalls and securing linux
xq10907
Posts: 19
Joined: 2017/08/08 03:33:41

Sudo is not working on my centos7.3

Postby xq10907 » 2017/08/16 08:05:35

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.

User avatar
avij
Forum Moderator
Posts: 2006
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Sudo is not working on my centos7.3

Postby avij » 2017/08/16 08:14:11

Please don't make multiple topics about the same issue. Further replies should be posted in the original topic. Closing this topic.