When I do a deloy of a host with Maas. The maas server creates a user Ubuntu and disables the user root.
When I try to login via SSH to that deployed hosts with the user root. I get the error message: “Please login as the user “ubuntu” rather than the user “root”.” This is becource cloud-init has the setting disable_root set on false.
Can I set the disable_root to true, so that after a deployment of the host I can login with ssh via the Root user.
I’m trying to install an OpenStack environment with a Maas server. I’m using Openstack-ansible playbook to install the openstack. But the Openstack-ansible requires root for the targets.
The solution for this is:
disable the setting disable_root, but where to do that.
overwrite the /root/.ssh/authorized_keys with curtin
The way we recommend customizing your deployments is via cloud-init or via curtin preseeds as you have done in your example (You can find more information in Customizing MAAS deployments with cloud-init).
You can pass user-data every time you deploy a machine via the API, or you can tell curtin to write cloud-init user-data on the installed system so it is executed on first boot. e.g in /etc/maas/curtin_userdata, you could add something like: