Skip to content

Instantly share code, notes, and snippets.

@tacofumi
Created May 23, 2019 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tacofumi/8f22e1b9fadf771080f5c7a957fb5be1 to your computer and use it in GitHub Desktop.
Save tacofumi/8f22e1b9fadf771080f5c7a957fb5be1 to your computer and use it in GitHub Desktop.
cloud-config.yml modified with NOPASSWD
run_cmd:
- "sudo adduser --disabled-password --gecos \"\" vagrant"
- "echo vagrant:vagrant | chpasswd"
- "mkdir -p /home/vagrant/.ssh"
- "chmod 0700 /home/vagrant/.ssh"
- "wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O /home/vagrant/.ssh/authorized_keys"
- "chmod 0600 /home/vagrant/.ssh/authorized_keys"
- "chown -R vagrant /home/vagrant/.ssh"
- "echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
k3os:
password: rancher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment