How to enable login with user/password on a deployed machine

Hello,

Is there a default set of credentials or a place I can find the credentials to perform a local login to begin troubleshooting on the deployed machine?

Is the only way to ensure this through a cloud-init script to create a user?

Recently I have been having some trouble deploying Ubuntu 22.04 to a couple of new servers. I have “local” access to the machines so I was hoping there was a way to log in and check the logs. I see when deploying there is an error with the hardware sync service. Other than that the system just fails due to time out but ubuntu is installed based on everything else I can see.

I have tried my Maas user creds, I have tried a ‘ubuntu’ user.

Hey there

Is there a default set of credentials or a place I can find the credentials to perform a local login to begin troubleshooting on the deployed machine?

Nope

Is the only way to ensure this through a cloud-init script to create a user?

Either this, a curtin late_command or create your own custom image

2 Likes

Thanks for the quick answer, seems like cloud-init would be the fastest method to implement. I will try using a snippet based on the example in the docs,

#cloud-config
users:
  - name: maas_user
    ssh_authorized_keys:
      - ssh-rsa AAAAB3Nz... user@domain
    sudo: "ALL=(ALL) NOPASSWD:ALL"
    groups: sudo
    shell: /bin/bash
packages:
  - git

Found here: Basic cloud-init configurations for MAAS

Also adding cloud-init docs: Configure Users and Groupd with Cloud-init

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.