Centos系统默认是没有开启sudo命令,如下提示:
[user@localhost ~]$ sudo ls /root
[sudo] password for user:
user is not in the sudoers file. This incident will be reported.
#
#需要编辑/etc/sudoers后添加,可以两种方式!
[root@localhost ~]# visudo
添加如下:
user ALL=(ALL) ALL
%sa ALL=(ALL) ALL
组
原文链接:https://www.f2er.com/centos/378255.html