devstack centos7 and sudoers syntax error

asked 2016-08-01 12:03:39 -0600

Im trying to get devstack up and running on CentOS7. I had cloned the repo under my account (has admin rights) which I know I want to clone it under the stack user, which I'll do after i get this working. As per the directions I ran the create-stack-user.sh which did create the stack user (checked /etc/passwd) and then, as per the directions I tried to check it with su stack which then prompts me for a password, which i thought was odd because as part of that script it installs Sudoer to allow it to run as sudo without a password, however i assume that means it can sudo without the password prompt, but it should still have a password. googling and digging around in the scripts didnt help.

So i got to poking and found that the sudoer file is apparently configured wrong?

i found that if i run:

sudo cat /etc/sudoers

which i expected it to spew out the file contents, however it seems that the install of sudoer broke something because it spews out the following errors

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: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 3 <<<
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

thankfully i had enabled the root account before doing all this because im not sure how i'd fix this otherwise.

su root
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
Defaults: !requiretty

Based on looking at the create user script, it looks like at least the first line, is injected in there by the script. It seems that its grumpy at all of the lines in there?

Thoughts? Thanks

edit retag flag offensive close merge delete