0

what is the password for the "ubuntu" and/or "root" user on the cloud images?

i see this has gone unanswered for a while: https://discourse.ubuntu.com/t/ubuntu-18-04-ova-cloud-username-password/8933

i am using the bionic ova in this case: https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.ova

here is someone using openstack that also needs password: Default username/password for Ubuntu Cloud image?

EDIT: I am using virtualbox, not vmware, but i do see there is functionality when using vmware to set the password on initial deploy, so i will try that...... so i guess the answer is cannot use ubuntu cloud images on vbox, as image needs cloud-init to create loginable users.

nandoP
  • 103
  • 1
  • 5

1 Answers1

7

I'm fairly certain there is no default password for either root or ubuntu.

If you download the cloud-image and mount the root file system without booting it you will see that /etc/shadow contains no password for root.

The ubuntu user does not even exist. cloud-init will create users on first boot. If you do not provide configuration for cloud-init then the default user configuration is used. That is defined in /etc/cloud.cfg as

   # Default user name + that default users groups (if added/used)
   default_user:
     name: ubuntu
     lock_passwd: True
     gecos: Ubuntu
     groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]
     sudo: ["ALL=(ALL) NOPASSWD:ALL"]
     shell: /bin/bash

This creates the ubuntu user with password login disabled.