I am trying to setup a headless ubuntu server so that in init a rdp would be setup so that I can connect to the Remote Desktop right away after the boot process is complete.
I found that this https://learn.microsoft.com/en-us/azure/virtual-machines/linux/use-remote-desktop?tabs=azure-powershell, works well if I do the setup manually but now I am trying to automate this using cloud-init.
For this I am passing following .yaml as user data to my cloud provider:
#cloud-config
package_update: true
users:
- default
- name: xrpd
groups:
- xrdp
- ssl-cert
packages:
- xfce4
- xrdp
- net-tools
runcmd:
- [ systemctl, enable, xrdp ]
- [ echo, xfce4-session, >~/.xsession ]
- [ systemctl, restart, xrdp ]
- [ ufw, allow, 3389 ]
power_state:
mode: reboot
message: rebooting after initial setup
timeout: 30
condition: True
Update works and packages are installed, xrdp is enabled etc. However, the user 'xrdp' is not set to be a part of a ssl-cert group and I fail to see why?
Thanks for the help!