Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant's Ubuntu 16.04 vagrantfile default password

I'm attempting to deploy and run an Ubuntu 16.04 VM via Vagrant 1.9.1. The Vagrantfile I'm using is from Atlas:

Ubuntu Xenial 16.04 Vagrantfile

I'm using Debian Stretch as the host OS. Vagrant was installed via a .deb available from Vagrant's website.

The Vagrantfile does run and deploy correctly. I can ssh into the VM via both my host OS and using 'vagrant ssh'. However, I have one minor blocker when attempting to ssh in from outside.

The default user in this VM is named 'ubuntu', and looks to have a password set. However, I have no idea what the password is at all, and no docs seem to have the information that I'm looking for. Attempting to set a password via 'passwd' within the VM asks for a current password. Anyone see where this is going?

So my big question is this: has anyone else deployed this same Vagrantfile, and if so, does anyone know what the default user's password is?

like image 213
rmenes379 Avatar asked Dec 27 '16 01:12

rmenes379


People also ask

What is the default password of Ubuntu root user?

So, what is the default root password for Ubuntu Linux? Short answer – none. The root account is locked in Ubuntu Linux.

What is the default vagrant password?

According to the Vagrant documentation, there is usually a default password for the user vagrant which is vagrant .

What is root password of vagrant box?

Root Password: "vagrant"


3 Answers

As of writing this answer: no one ever publicly shared the password for user ubuntu on ubuntu/xenial64 Vagrant box (see #1569237).

It's not necessary. You can:

  • login using SSH key authentication
  • change the password using sudo passwd ubuntu (by default ubuntu user has sudo-permissions with NOPASSWD set)

Actually, not only you can, but you should change the password.

like image 158
techraf Avatar answered Oct 21 '22 23:10

techraf


The password is located in the ~/.vagrant.d/ubuntu-VAGRANTSLASH-xenial64/20161221.0.0/virtualbox/Vagrantfile as mention by user @prometee in this launchpad discussion #1569237.

Here is mine (line 8):

# Front load the includes
include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__)
load include_vagrantfile if File.exist?(include_vagrantfile)

Vagrant.configure("2") do |config|
  config.vm.base_mac = "022999D56C03"
  config.ssh.username = "ubuntu"
  config.ssh.password = "fbcd1ed4fe8c83b157dc6e0f"

  config.vm.provider "virtualbox" do |vb|
     vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ]
     vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, "ubuntu-xenial-16.04-cloudimg-console.log") ]
  end
end

FYI, user @racb mention in the same discusison that the this bug report having been filed to ubuntu and so far no [...] decision has been made yet about it.

like image 28
Voncay Avatar answered Oct 22 '22 00:10

Voncay


The default user and password is:

user: vagrant password: vagrant

like image 22
Lior Bernard Avatar answered Oct 21 '22 22:10

Lior Bernard