# Window Host without password

**URL:** <https://forum.ansible.com/t/window-host-without-password/28022>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [July 11, 2018, 3:26am UTC](https://forum.ansible.com/t/window-host-without-password/28022 "2018-07-11T03:26:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tommy.lin](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@tommy.lin](https://forum.ansible.com/u/tommy.lin)\
**Post date:** [July 11, 2018, 3:26am UTC](https://forum.ansible.com/t/window-host-without-password/28022/1 "2018-07-11T03:26:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [July 11, 2018, 10:53am UTC](https://forum.ansible.com/t/window-host-without-password/28022/2 "2018-07-11T10:53:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [July 11, 2018, 9:05pm UTC](https://forum.ansible.com/t/window-host-without-password/28022/3 "2018-07-11T21:05:00Z")

</div>

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)](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

```auto
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

---

<div class="post-metadata">

**Author:** ![tommy.lin](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@tommy.lin](https://forum.ansible.com/u/tommy.lin)\
**Post date:** [July 12, 2018, 7:18am UTC](https://forum.ansible.com/t/window-host-without-password/28022/4 "2018-07-12T07:18:40Z")

</div>

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}

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [July 12, 2018, 7:22am UTC](https://forum.ansible.com/t/window-host-without-password/28022/5 "2018-07-12T07:22:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tommy.lin](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@tommy.lin](https://forum.ansible.com/u/tommy.lin)\
**Post date:** [July 17, 2018, 11:36am UTC](https://forum.ansible.com/t/window-host-without-password/28022/6 "2018-07-17T11:36:17Z")

</div>

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