Fixing the Ubuntu Xenial Vagrant Box

The official vagrant box of Ubuntu Xenial 64 was initially with a issue: it didn’t have a vagrant user (according to Vagrant recommendations all boxes should have a user with name vagrant and password vagrant).

A recent release fixed the problem in a partial way: the user vagrant was added, but it is not possible to use it with password authentication (a feature that I usually need in my workshops).

So to fix this issue I created a new vagrant box based on the official Xenial box. I added the following lines in the shell provisioner:

echo "vagrant:vagrant" | sudo chpasswd
sed -i -e 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config

The first line set the password vagrant for the user vagrant. The second line enables PasswordAuthentication.

Deja una respuesta

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Salir /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Salir /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Salir /  Cambiar )

Conectando a %s

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.