New Question
0

MAAS & Windows 8.1 password issue

asked 2015-05-18 06:07:37 +0300

Chuntzu gravatar image

Have been able to make a windows server 2012 r2 image that works great with maas and the curtin installer, but when I try with windows 8.1 ent the password that is generated and installed does not work on first boot. I have looked at the unattend file that gets generated and the password that I want to use is there but it doesnt work when the image gets installed on the server. Also strange is the fact that the account name is Admin for windows 8.1 but is Administrator for server 2012 r2. I have a feeling it has something to due with the unattend file settings but just dont know what to adjust it to to get it to work. Any help would be great. Thank you again.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2015-05-25 11:57:57 +0300

gabriel-samfira gravatar image

Hi Chuntzu!

In general we do not recommend using/setting passwords via unattend.xml. I highly recommend you generate a x509 certificate and upload that to MaaS. You will then be able to use that x509 certificate to execute remote commands on your newly installed windows machine over ssl without any passwords.

To generate a new x509 key, log into your MaaS node and run the following command:

maas-generate-winrm-cert

The public portion of the key will be printed to screen. Copy that key (including the "BEGIN CERTIFICATE" and "END CERTIFICATE" portion) and upload it to your MaaS node under user-->preferences-->SSL keys. (it should be in the same place you saved your SSH public key)

After you do this, deploy a new windows machine. After it gets installed and cloudbase-init finishes running, you should be able to run remote commands via WinRM.

You may find a small and nifty python script that can issue remote commands from windows here: https://raw.githubusercontent.com/clo...

Please note that you will need pywinrm for this to work:

sudo pip install pywinrm

after which you will be able to run:

./wsmancmd.py -H <IP_OF_WINDOWS_MACHINE> -s -a certificate -c $HOME/.ssl/winrm_client_cert.pem -k $HOME/.ssl/winrm_client_cert.key "net user Administrator supersecretp@ss"

Please note that windows 8.1 is not in the official list of supported OS (only server OS versions). You may not have an option to set a serial key. MaaS does offer the option to specify a KMS server, in which case it should be fine.

Let me know if it works for you.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2015-05-18 06:07:37 +0300

Seen: 742 times

Last updated: May 25 '15