{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/21267","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/21267/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/21267/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/21267/events","html_url":"https://github.com/ansible/ansible/issues/21267","id":206889244,"number":21267,"title":"win_user:  Changing ansible management account's password works but errors out","user":{"login":"impala454","id":2024649,"avatar_url":"https://avatars.githubusercontent.com/u/2024649?v=3","gravatar_id":"","url":"https://api.github.com/users/impala454","html_url":"https://github.com/impala454","followers_url":"https://api.github.com/users/impala454/followers","following_url":"https://api.github.com/users/impala454/following{/other_user}","gists_url":"https://api.github.com/users/impala454/gists{/gist_id}","starred_url":"https://api.github.com/users/impala454/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impala454/subscriptions","organizations_url":"https://api.github.com/users/impala454/orgs","repos_url":"https://api.github.com/users/impala454/repos","events_url":"https://api.github.com/users/impala454/events{/privacy}","received_events_url":"https://api.github.com/users/impala454/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-10T19:45:38Z","updated_at":"2017-02-10T19:45:38Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nwin_user\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.0.0.2\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\ndefaults\r\n\r\n##### OS / ENVIRONMENT\r\nAnsible:  Ubuntu 16.04\r\nManaged:  Windows 8.1 x64\r\n\r\n##### SUMMARY\r\nWhen changing the account password used to administer the remote machine, the ansible command errors out but still works.\r\n\r\n##### STEPS TO REPRODUCE\r\n1. Set up ansible to administer a remote windows machine using a local windows account as the login\r\n2. Invoke the win_user module to change that user's password\r\n\r\n```\r\nansible windows -m win_user -a \"name=ansibleadmin password=secret\"\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nNominally would expect the SUCCESS response showing the modified user account info.\r\n\r\n##### ACTUAL RESULTS\r\nCommand errors out, however the password still actually changes as intended.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/dist-packages/ansible/plugins/connection/winrm.py\", line 243, in exec_command\r\n    result = self._winrm_exec(cmd_parts[0], cmd_parts[1:], from_exec=True)\r\n  File \"/usr/lib/python2.7/dist-packages/ansible/plugins/connection/winrm.py\", line 211, in _winrm_exec\r\n    self.protocol.cleanup_command(self.shell_id, command_id)\r\n  File \"/home/chuck/.local/lib/python2.7/site-packages/winrm/protocol.py\", line 307, in cleanup_command\r\n    res = self.send_message(xmltodict.unparse(req))\r\n  File \"/home/chuck/.local/lib/python2.7/site-packages/winrm/protocol.py\", line 207, in send_message\r\n    return self.transport.send_message(message)\r\n  File \"/home/chuck/.local/lib/python2.7/site-packages/winrm/transport.py\", line 190, in send_message\r\n    raise InvalidCredentialsError(\"the specified credentials were rejected by the server\")\r\nInvalidCredentialsError: the specified credentials were rejected by the server\r\n192.168.1.73 | FAILED! => {\r\n    \"failed\": true, \r\n    \"msg\": \"ERROR! failed to exec cmd PowerShell -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -EncodedCommand UwBlAHQALQBTAHQAcgBpAGMAdABNAG8AZABlACAALQBWAGUAcgBzAGkAbwBuACAATABhAHQAZQBzAHQACgBUAHIAeQAKAHsACgAmACAAIgBDADoAXABVAHMAZQByAHMAXABlAHIAYQBkAG0AaQBuAFwAQQBwAHAARABhAHQAYQBcAEwAbwBjAGEAbABcAFQAZQBtAHAAXABhAG4AcwBpAGIAbABlAC0AdABtAHAALQAxADQAOAA2ADcANQAzADYAOQAzAC4AMQA4AC0AMgA0ADIAMAAzADEANwAxADgANQA5ADQAOQA3ADMAXAB3AGkAbgBfAHUAcwBlAHIALgBwAHMAMQAiAAoAfQAKA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