问题:想在普通用户(test)下使用 yum install samba -y 命令安装samba,报错:You need to be root to perform this command.
首先,进入root(su root)为用户test添加sudo权限,编辑etc/sudoers文件,在 root ALL=(ALL) ALL 下边加一行 test ALL=(ALL) NOPASSWD:ALL ,然后保存;
进入test用户(su test),执行 sudo yum install samba -y 进行安装,就可以安装了。