Skip to content

Commit

Permalink
Adds "NoChangePassword" (#145)
Browse files Browse the repository at this point in the history
Signed-off-by: Mobmaker <45888585+Mobmaker55@users.noreply.github.com>
  • Loading branch information
Mobmaker55 authored Jul 17, 2022
1 parent 4cf3673 commit 4b1c10e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions checks_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ func (c cond) UserDetail() (bool, error) {
return user.IsAdmin == lookingFor, nil
case "PasswordNeverExpires":
return user.PasswordNeverExpires == lookingFor, nil
case "NoChangePassword":
return user.NoChangePassword == lookingFor, nil
default:
fail("c.Key (" + c.Key + ") passed to userDetail is invalid.")
return false, errors.New("invalid detail")
Expand Down
17 changes: 12 additions & 5 deletions docs/userproperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ These are the user properties that you would normally find the the user edit dia

**Usernames are case sensitive.** `Yes`/`No` are not case sensitive. If you input something other than "yes" or "no" for a boolean check, it defaults to "no".

- `FullName`: Full name of user (case sensitive)
- `IsEnabled`: Yes or No
- `IsLocked`: Yes or No
- `IsAdmin`: Yes or No
- `PasswordNeverExpires`: Yes or No
- `FullName`: Full name of user (case sensitive)
- `IsEnabled`: Yes or No
- This returns for whether the account is **disabled**.
- `IsLocked`: Yes or No
- This returns for whether the account is **locked out**.
- (incorrect password attempts, temporary)
- `IsAdmin`: Yes or No
- Does the account have admin access?
- `PasswordNeverExpires`: Yes or No
- Password does not expire.
- `NoPasswordChange`: Yes or No
- Password cannot be changed.

0 comments on commit 4b1c10e

Please sign in to comment.