在 centos 中为用户运行 sudo 命令

在 centos 中为用户运行 sudo 命令

在 Centos-6.1 上,用户属于 root 组,但无法运行 sudo 命令

mahmood@cluster:~$ groups
root kvm vboxusers google-otp mahmood
mahmood@cluster:~$ sudo ls
[sudo] password for mahmood:
Sorry, user mahmood is not allowed to execute '/bin/ls' as root on cluster.scu

对此您有什么想法吗?

答案1

https://www.centos.org/docs/4/4.5/Security_Guide/s3-wstation-privileges-limitroot-sudo.html

您应该编辑文件:/etc/sudoers(使用命令 visudo),并添加:

用户 ALL=(全部) 全部

相关内容