Window Host without password

Hi all,

May I know how should I configure the vars while I am going to connect to a windows host which has no password

Regards

Not something I have tried, but I think maybe a better idea would be to set up and Administrator password and use that. I would hope that your user without a password is just a regular user, rather than a member of Administrators group.
Since a lot of the things you are likely to want to do using ansible (installing programs) are likely to need administrative permissions, it is probably worthwhile setting up a suitable user.

Hope this helps,

Jon

Same I haven’t tried to do this but technically should work if you bypass the restrictions Microsoft place on these types of accounts. Honestly you should not be doing this anyway as it leaves your host at the mercy of anybody who can access it. As Jon says, you are better off creating an Administrator with a strong password and use that account instead.

If you really want to get this working, the first thing you need to disable is the limit local account use of blank password to console only https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj852174(v=ws.11). By default this is set to Enabled which means you can only log on with a passwordless account when using it locally. Setting

HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\LimitBlankPasswordUse to 0 will disable this and allow a network logon with this account through things like RDP and WinRM.

Thanks

Jordan

Thanks for your replies. I have already setup an admin account which have no password.
But, when I was implementing my playbook and leave ansible_password as empty.
Then, Ansible stopped the test with the following warning

{“changed”: false, “msg”: “basic: auth method basic requires a password”, “unreachable”: true}

Try setting ansible_password: ‘’ instead of having it undefined. Once again I can’t guarantee this will work and highly recommend you don’t do this.

It seems not work. BTW, I will create another account for this. Thanks for your helps