← Back to team overview

maas-devel team mailing list archive

Enable root ssh access and run custom post-install commands

 

Hello,

I am working on setting up a MAAS 1.6 server on Ubuntu 14.04. I have
successfully configured MAAS and can commission nodes, however I would like to
be able to run some custom commands after the OS has been installed. I tried
adding a "custom" entry to the late_commands section in
/etc/maas/preseeds/curtin_userdata as demonstrated on this page:
https://maas.ubuntu.com/docs/development/preseeds.html

However, it appears that the command I specified did not get executed. I also
tried specifying the command as a python array, but it also did not work:
test_command: ['sh', '-c', 'echo test > /home/ubuntu/test.txt']

Therefore, I have 2 questions: 
1. how can I run custom commands or scripts after installation?  
2. how can I allow ssh access directly to root? I see that I could set 
disable_root in /etc/cloud/cloud.cfg to false, but I do not know how to set 
this from the MAAS server?

Thanks,

Andrew Martin