New Question
0

Can't activate administrator account

asked 2017-06-12 23:17:00 +0200

prophecy408 gravatar image

Hey Guys,

I tried many different ways to try to activate the Administrator account, but can't see to get the account to stay active after sysprep once the image is installed the account is deactivated. I tried editing the unattend.xml to run the command net user administrator /active:yes. but no luck in have that account active in the image once sysprep is done. Any idea on whats the proper want to enable the admin account using the windows-openstack-imaging-tools

https://github.com/cloudbase/windows-...

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2017-06-13 00:29:01 +0200

avladu gravatar image

Hello,

The Administrator user account is reset (and not deactivated) during the sysprep phase, to generalize the image.

As cloudbase-init is installed in your image, you can set in C:\Program Files\Cloudbase Solutions\conf\cloudbase-init.conf:
[DEFAULT]
username=Administrator

In this case, the Administrator account will have its password updated if you use the image on OpenStack, and you can retrieve the password using nova get-password instanceid pathtoprivatekey. More info here: https://cloudbase-init.readthedocs.io...

Thank you,
Adrian Vladu

edit flag offensive delete link more

Comments

So the Admin account is the account that's currently syncing password with NOVA and that account shows up perfectly fine, i'm trying to activate the hidden Administrator account which will activate once i login to the ADMIN account and run the net user command. I want to have both the Admin and the

prophecy408 gravatar imageprophecy408 ( 2017-06-13 00:39:29 +0200 )edit

administrator account installed into the image during the first install. So how can I have it activated the administrator account when creating the image through window-imaging-tool?

prophecy408 gravatar imageprophecy408 ( 2017-06-13 00:39:42 +0200 )edit

You need to set it a password after the image boots for the first time. You can either use cloudbase-init username=Administrator (but you will not have Admin user created) or you can use userdata scripts to set a password for Administrator. net user Administrator "YourStrongPassword" should do.

avladu gravatar imageavladu ( 2017-06-13 00:48:50 +0200 )edit

So we basically we have to choose between the Admin account or the Administrator account and we can't have both activate during the first boot?

prophecy408 gravatar imageprophecy408 ( 2017-06-13 01:34:32 +0200 )edit

I suggest to use userdata scripts or localscripts to automatically set the password for the user you require, but I do not recommend it, as the password will be in cleartext at some moment on the instance. If that is not an issue though, then it makes sense to use one of these suggestions.

avladu gravatar imageavladu ( 2017-06-13 02:13:39 +0200 )edit
0

answered 2017-06-13 14:43:40 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

If I want to set Administrator password to static string, Can I use like this?

[DEFAULT]
username=Administrator
groups=Administrators
first_logon_behaviour="MySecretPassword" <-- or with "no" option ???

If I change username from "Admin" to "Administrator", then ConfigWinRMCertificateAuthPlugin still enable password-less for WinRM on the instance or not? and winrmenablebasic_aut as well, Does it enable by default after install cloudbase-init?

edit flag offensive delete link more

Comments

Hello, first_logon_behaviour how to: https://cloudbase-init.readthedocs.io/en/latest/plugins.html#setting-password-main So you cannot set your password in clear text there. Here is the information you need to set the password using OpenStack:https://cloudbase.it/openstack-windows-admin-password/

avladu gravatar imageavladu ( 2017-06-13 15:20:44 +0200 )edit

And you have a valid point on the fact that currently there is no automated way to specify the localscripts for cloudbase-init to run from the windows imaging tools. I have opened an issue here to track the functionality: https://github.com/cloudbase/windows-openstack-imaging-tools/issues/132

avladu gravatar imageavladu ( 2017-06-13 15:28:07 +0200 )edit

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: 2017-06-12 23:17:00 +0200

Seen: 83 times

Last updated: Jun 13