centos – sudoers列表中的错误

我一直在尝试使用devstack在centos上安装Openstack.当我运行脚本时,我收到以下错误:

[vagrant@centos64 devstack]$./stack.sh 
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
RDO repo not detected; installing
++ proxychains /usr/bin/yum.bin install http://rdo.fedorapeople.org/openstack-havana/rdo-release-havana.rpm
ProxyChains-3.1 (http://proxychains.sf.net)
Loaded plugins: fastestmirror
You need to be root to perform this command.
[Call Trace]
./stack.sh:224:die
[ERROR] ./stack.sh:224 Error installing RDO repo, cannot continue

现在,这是/etc/sudoers.d/50_stack_sh文件:

[root@centos64 devstack]# cat /etc/sudoers.d/50_stack_sh
 ALL=(root) NOPASSWD:ALL
Defaults: secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin

我尝试编辑它,但它说它是一个只读缓冲区,即使对于root用户也是如此.我试图通过编辑/ etc / sudoers文件将vagrant用户添加到sudoers组,但是它给出了与只读缓冲区相同的错误.我该如何解决这个错误?

最佳答案
你需要一个密码少的sudo用户才能安装devstack的主要问题.
尝试运行:devstack / tools / create-stack-user.sh
之后它应该工作.

转载注明原文:centos – sudoers列表中的错误 - 代码日志