gpt4 book ai didi

centos - sudoers 列表中的错误

转载 作者:太空宇宙 更新时间:2023-11-03 17:14:18 27 4
gpt4 key购买 nike

我一直在尝试使用 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 列表中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22472931/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com