0

I am using ready-made images of debian in the qcow2 format. The default user is "debian". I want to create another user via openstack-horizon. So I elaborated the following script:

#cloud-config
users:
  - name: jumper
    ssh-authorized-keys:
      - ssh-rsa myKeyhere
    sudo: ["ALL=(ALL) NOPASSWD:ALL"]
    groups: sudo
    shell: /bin/bash

By default, the settings in the /etc/cloud/cloud.cfg file are performed for instance creation. When I create the new user via script the debian user is not created. Is this right? When I create a new user are all cloud.cfg settings ignored?

campos
  • 17
  • 3

1 Answers1

1

You can make sure that the default user is also added by adding - default to the lists of users.

#cloud-config
users:
  - default
  - name: jumper
    ssh-authorized-keys:
      - ssh-rsa myKeyhere
    sudo: ["ALL=(ALL) NOPASSWD:ALL"]
    groups: sudo
    shell: /bin/bash
BakaKuna
  • 146
  • 5