# Windows\_error\_401\_Unauthorized. basic auth failed

**URL:** <https://forum.ansible.com/t/windows-error-401-unauthorized-basic-auth-failed/21251>\
**Category:** Ansible Project\
**Tags:** windows, ubuntu\
**Created:** [April 24, 2016, 4:25pm UTC](https://forum.ansible.com/t/windows-error-401-unauthorized-basic-auth-failed/21251 "2016-04-24T16:25:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadaa.19990](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sadaa.19990](https://forum.ansible.com/u/sadaa.19990)\
**Post date:** [April 24, 2016, 4:25pm UTC](https://forum.ansible.com/t/windows-error-401-unauthorized-basic-auth-failed/21251/1 "2016-04-24T16:25:41Z")

</div>

hi  
is there anyone can help me !

I’m trying to connect to windows machine . ( windows 10)

I get this error “401\_Unauthorized. basic auth failed”

i use ubuntu 14.04 as controller machine !

ansible version 1.9.1

---

<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:** [April 25, 2016, 12:53pm UTC](https://forum.ansible.com/t/windows-error-401-unauthorized-basic-auth-failed/21251/2 "2016-04-25T12:53:03Z")

</div>

Hello,

Make sure you have gone through all the set up steps

Installing the extra components you need on the ansible controller:

[http://docs.ansible.com/ansible/intro\_windows.html#installing-on-the-control-machine](http://docs.ansible.com/ansible/intro_windows.html#installing-on-the-control-machine)

Modifying your ansible inventory / group\_vars with windows-specific settings:

[http://docs.ansible.com/ansible/intro\_windows.html#inventory](http://docs.ansible.com/ansible/intro_windows.html#inventory)

and running the setup steps on the windows machines that you want to control:

[http://docs.ansible.com/ansible/intro\_windows.html#windows-system-prep](http://docs.ansible.com/ansible/intro_windows.html#windows-system-prep)

Usually the message you are seeing is because the username and password don’t match. Sometimes this happens when you attempt to use a windows domain username but don’t have all the components in place on the ansible controller for it to connect via kerberos (which is needed in order to use domain users at the moment).

You can also run ansible / ansible-playbook commands with -v or -vvvvvv for extra information. This can help find out which user ansible is attempting to connect as.

Sometimes it is useful to look in the event viewer on the windows machine you are trying to connect to.

Hope this helps,

Jon
