#32 config.sh: Add snippet to configure sudo for Vagrant images
Merged 3 months ago by ngompa. Opened 3 months ago by ngompa.

file modified
+7
@@ -147,6 +147,13 @@ 

  chmod 600 ~vagrant/.ssh/authorized_keys

  chown -R vagrant:vagrant ~vagrant/.ssh/

  

+ cat > /etc/sudoers.d/vagrant << EOSUDOER

+ ## Ensure the vagrant user always can use sudo

+ Defaults:vagrant !requiretty

+ vagrant ALL=(ALL) NOPASSWD: ALL

+ EOSUDOER

+ chmod 600 /etc/sudoers.d/vagrant

+ 

  cat > /etc/ssh/sshd_config.d/10-vagrant-insecure-rsa-key.conf <<EOF

  # For now the vagrant insecure key is an rsa key

  # https://github.com/hashicorp/vagrant/issues/11783

The vagrant user used in Vagrant images needs the ability
to use sudo with no restrictions. This is fine and expected
for Vagrant images, as they are only intended to be used
for development purposes.

Fixes: https://pagure.io/cloud-sig/issue/420

rebased onto c8ccbc3ccf4883950422fc5916ede6115fb57ef6

3 months ago

rebased onto 64b3ca0

3 months ago

Pull-Request has been merged by ngompa

3 months ago
Metadata