Skip to content

[docs]: Explicitly mention the need to put - default in the users array if we want to modify an existing user #6702

@mostafaCamel

Description

@mostafaCamel

Documentation request

While creating a VM in openstack with the following userdata

users:
  - name: ubuntu    
    shell: /bin/bash
    hashed_passwd: $6$ViQQI4kReDWrps3y$TSzStkHkxYKn6VlaWRVrhwZSsoVe3nxolR58Iz0063Rp1Ba4w8gFtep9uy4N8cpmcF7Ey0fYrm2lmcYEHT.E./
    lock_passwd: false
    sudo: ALL=(ALL) NOPASSWD:ALL

the openstack keypair was not added to ubuntu user and rather was added only to the root user.

This was fixed once I noticed I needed to put -default on the top of the users entry ... i.e.

users:
  - default
  - name: ubuntu    
    shell: /bin/bash
    hashed_passwd: $6$ViQQI4kReDWrps3y$TSzStkHkxYKn6VlaWRVrhwZSsoVe3nxolR58Iz0063Rp1Ba4w8gFtep9uy4N8cpmcF7Ey0fYrm2lmcYEHT.E./
    lock_passwd: false
    sudo: ALL=(ALL) NOPASSWD:ALL

The cloud-init examples have the -default entry but do not explicitly mention the need to put it. Also,

Image used: https://cloud-images.ubuntu.com/jammy/20251216/jammy-server-cloudimg-amd64.img

ubuntu@vmwithpassword:~$ cloud-init --version
/usr/bin/cloud-init 25.2-0ubuntu1~22.04.1

ubuntu@vmwithpassword:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.5 LTS
Release:	22.04
Codename:	jammy

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThis Pull Request changes documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions