Jira (PUP-6569) Improve error messaging for Windows user management

3 views
Skip to first unread message

Moses Mendoza (JIRA)

unread,
Aug 1, 2016, 3:46:51 PM8/1/16
to puppe...@googlegroups.com
Moses Mendoza created an issue
 
Puppet / Task PUP-6569
Improve error messaging for Windows user management
Issue Type: Task Task
Assignee: Unassigned
Created: 2016/08/01 12:44 PM
Priority: Normal Normal
Reporter: Moses Mendoza

While investigating PUP-6483, we found that we could be more specific with our error handling when performing some user password management tasks on Windows.

Per Rob Reynolds in PUP-6483:

A few error codes we could explore handling some of the errors and providing better messages around how to correct. Possibly as a separate ticket though.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385(v=vs.85).aspx

* ERROR_LAST_ADMIN  - 1322 (0x52A) - This operation is disallowed as it could result in an administration account being disabled, deleted or unable to log on.
* ERROR_WRONG_PASSWORD - 1323 (0x52B) - Unable to update the password. The value provided as the current password is incorrect.
* ERROR_ILL_FORMED_PASSWORD - 1324 (0x52C) - Unable to update the password. The value provided for the new password contains values that are not allowed in passwords.
* ERROR_PASSWORD_RESTRICTION - 1325 (0x52D) - Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirements of the domain.
* ERROR_LOGON_FAILURE - 1326 (0x52E) - The user name or password is incorrect.
* ERROR_ACCOUNT_RESTRICTION - 1327 (0x52F) - Account restrictions are preventing this user from signing in. For example: blank passwords aren't allowed, sign-in times are limited, or a policy restriction has been enforced.
* ERROR_INVALID_LOGON_HOURS - 1328 (0x530) - Your account has time restrictions that keep you from signing in right now.
* ERROR_INVALID_WORKSTATION - 1329 (0x531) - This user isn't allowed to sign in to this computer.
* ERROR_PASSWORD_EXPIRED - 1330 (0x532) - The password for this account has expired.
* ERROR_ACCOUNT_DISABLED - 1331 (0x533) - This user can't sign in because this account is currently disabled.

In Scope

  • Modify the Puppet Windows user provider or backing libs in puppet/util/windows to detect and surface some or all of the preceding errors to the user when applicable
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Moses Mendoza (JIRA)

unread,
Aug 1, 2016, 3:47:32 PM8/1/16
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Sprint: Windows Triage

Rob Reynolds (JIRA)

unread,
Aug 1, 2016, 4:06:07 PM8/1/16
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Change By: Rob Reynolds
Component/s: Windows
Component/s: Types and Providers

Rob Reynolds (JIRA)

unread,
Aug 1, 2016, 4:06:08 PM8/1/16
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Change By: Rob Reynolds
Labels: type_user windows

Kenaz Kwa (JIRA)

unread,
Aug 4, 2016, 7:52:05 PM8/4/16
to puppe...@googlegroups.com
Kenaz Kwa updated an issue
Change By: Kenaz Kwa
Sprint: Windows  Triage  2016-08-24

Craig Gomes (JIRA)

unread,
Aug 8, 2016, 5:28:04 PM8/8/16
to puppe...@googlegroups.com
Craig Gomes updated an issue
Change By: Craig Gomes
Sprint: Windows 2016- 08 09 - 24 07

Moses Mendoza (JIRA)

unread,
Aug 19, 2016, 6:18:05 PM8/19/16
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
While investigating PUP-6483, we found that we could be more specific with our error handling when performing some user password management tasks on Windows.

Per [~rob] in PUP-6483:
{quote}

A few error codes we could explore handling some of the errors and providing better messages around how to correct. Possibly as a separate ticket though.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385(v=vs.85).aspx
{code}

* ERROR_LAST_ADMIN  - 1322 (0x52A) - This operation is disallowed as it could result in an administration account being disabled, deleted or unable to log on.
* ERROR_WRONG_PASSWORD - 1323 (0x52B) - Unable to update the password. The value provided as the current password is incorrect.
* ERROR_ILL_FORMED_PASSWORD - 1324 (0x52C) - Unable to update the password. The value provided for the new password contains values that are not allowed in passwords.
* ERROR_PASSWORD_RESTRICTION - 1325 (0x52D) - Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirements of the domain.
* ERROR_LOGON_FAILURE - 1326 (0x52E) - The user name or password is incorrect.
* ERROR_ACCOUNT_RESTRICTION - 1327 (0x52F) - Account restrictions are preventing this user from signing in. For example: blank passwords aren't allowed, sign-in times are limited, or a policy restriction has been enforced.
* ERROR_INVALID_LOGON_HOURS - 1328 (0x530) - Your account has time restrictions that keep you from signing in right now.
* ERROR_INVALID_WORKSTATION - 1329 (0x531) - This user isn't allowed to sign in to this computer.
* ERROR_PASSWORD_EXPIRED - 1330 (0x532) - The password for this account has expired.
* ERROR_ACCOUNT_DISABLED - 1331 (0x533) - This user can't sign in because this account is currently disabled.
{code}
{quote}

*In Scope*
* Modify the Puppet Windows user provider or backing libs in puppet/util/windows to detect and surface some or all of the preceding errors to the user when applicable

*Notes*
From - https://github.com/puppetlabs/puppet/pull/5201#discussion_r75033133

{{ERROR_ACCOUNT_LOCKED_OUT = 1909}} - is raised if account is locked out even when supplied login credentials are valid
With both {{ERROR_ACCOUNT_LOCKED_OUT = 1909}} and {{ERROR_ACCOUNT_EXPIRED = 1793}}, puppet will proceed to set the password anyway after failed logon.
Both of these (and probably others) are cases we could improve on... for example, puppet should not try to set passwords for expired or locked out accounts, and possibly should log a debug message that this was encountered?

Ethan Brown (JIRA)

unread,
Aug 22, 2016, 4:19:03 PM8/22/16
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Sprint: Windows 2016-09- 07 21

Moses Mendoza (JIRA)

unread,
Sep 22, 2016, 4:36:03 PM9/22/16
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Sprint: Windows 2016-09-21
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Doug Rosser (JIRA)

unread,
May 16, 2017, 4:55:03 PM5/16/17
to puppe...@googlegroups.com
Doug Rosser updated an issue
Change By: Doug Rosser
Labels: triaged type_user windows

Branan Riley (JIRA)

unread,
May 11, 2018, 2:59:02 PM5/11/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: triaged type_and_provider type_user user windows
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Casey Williams (JIRA)

unread,
Aug 14, 2018, 7:23:03 PM8/14/18
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Aug 21, 2018, 3:18:03 PM8/21/18
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Platform OS Kanban

Jonathan Morris (JIRA)

unread,
Oct 3, 2018, 12:46:04 PM10/3/18
to puppe...@googlegroups.com
Jonathan Morris commented on Task PUP-6569
 
Re: Improve error messaging for Windows user management

Disabled, expired and locked accounts are detected; passwords cannot be changed for accounts in these states and a warning is reported. More expansive error reporting will be addressed in a separate ticket.

Dorin Pleava (JIRA)

unread,
Oct 15, 2019, 8:10:03 AM10/15/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages