maas-devel team mailing list archive
-
maas-devel team
-
Mailing list archive
-
Message #02082
Enable root ssh access and run custom post-install commands
-
To:
maas-devel@xxxxxxxxxxxxxxxxxxx
-
From:
Andrew Martin <amartin@xxxxxxxxxxx>
-
Date:
Thu, 28 May 2015 16:41:07 -0500 (CDT)
-
In-reply-to:
<1311078183.667362.1432848412695.JavaMail.zimbra@xes-inc.com>
-
Thread-index:
Zjw8aKShYNUWG4M1A4imvKXplepAcQ==
-
Thread-topic:
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