You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
Recieving an error message after attempting to enable a disabled account:
FAILED! => {"changed": false, "failed" true, "msg": "Exception calling "Validate Credentials" with "2" argument(s): "This user can't sign in because this account is currently disabled.\r\n""}
STEPS TO REPRODUCE
1.) I created a Windows user using win_user module
name: Add Windows Admin User
win_user:
name: ansible
password: my_obscured_pass1
password_never_expires: yes
update_password: always
state: present
user_cannot_change_password: yes
groups: Administrators
groups_action: add
fullname: "Ansible Test User"
description: "An account for testing with Ansible
2.) I used win_user module to disable the account
win_user:
name: ansible
state: present
account_disabled: yes
3.) I tried to use win_user module like in the first step, but added the account_disabled: no and account_locked: no parameters to attempt to reenable the account.
name: Add Windows Admin User
win_user:
name: ansible
password: my_obscured_pass1
password_never_expires: yes
update_password: always
account_disabled: no
account_locked: no
state: present
user_cannot_change_password: yes
groups: Administrators
groups_action: add
fullname: "Ansible Test User"
description: "An account for testing with Ansible
EXPECTED RESULTS
I expected the user account to be enabled after being disabled as well as unlocked if it were locked out.
ACTUAL RESULTS
FAILED! => {"changed": false, "failed" true, "msg": "Exception calling \"Validate Credentials\" with \"2\" argument(s): \"This user can't sign in because this account is currently disabled.\r\n\""}
The text was updated successfully, but these errors were encountered:
ahuffman
changed the title
win_user module fails if account has been disabled
win_user module fails if the windows account has already been disabled
Aug 9, 2016
ISSUE TYPE
COMPONENT NAME
win_user.ps1
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
Recieving an error message after attempting to enable a disabled account:
FAILED! => {"changed": false, "failed" true, "msg": "Exception calling "Validate Credentials" with "2" argument(s): "This user can't sign in because this account is currently disabled.\r\n""}
STEPS TO REPRODUCE
1.) I created a Windows user using win_user module
win_user:
name: ansible
password: my_obscured_pass1
password_never_expires: yes
update_password: always
state: present
user_cannot_change_password: yes
groups: Administrators
groups_action: add
fullname: "Ansible Test User"
description: "An account for testing with Ansible
2.) I used win_user module to disable the account
win_user:
name: ansible
state: present
account_disabled: yes
3.) I tried to use win_user module like in the first step, but added the account_disabled: no and account_locked: no parameters to attempt to reenable the account.
win_user:
name: ansible
password: my_obscured_pass1
password_never_expires: yes
update_password: always
account_disabled: no
account_locked: no
state: present
user_cannot_change_password: yes
groups: Administrators
groups_action: add
fullname: "Ansible Test User"
description: "An account for testing with Ansible
EXPECTED RESULTS
I expected the user account to be enabled after being disabled as well as unlocked if it were locked out.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: