Skip to content

UserInfo

A snapshot of a Windows user account's mutable state.

Returned by User.info, User.update and users. Passwords are write-only and never appear in a snapshot.

Fields

account_expires @ (time.DateTime | nil) [get]

Account expiration, or nil when the account never expires.

bad_password_count @ Int [get]

Recorded failed password attempts.

comment @ (Str | nil) [get]

Administrative account comment.

disabled @ Bool [get]

Whether the account is disabled.

flags @ UserFlags [get]

Complete native account flags.

full_name @ (Str | nil) [get]

Display name.

home_dir @ (fs.Path | nil) [get]

Home directory.

home_dir_drive @ (Str | nil) [get]

Drive designator assigned to the home directory at logon, such as "Z:".

last_logon @ (time.DateTime | nil) [get]

Last recorded logon.

logon_count @ Int [get]

Recorded successful logons.

name @ Str [get]

Account name.

password_age @ time.Duration [get]

Time since the password was last changed.

password_cannot_change @ Bool [get]

Whether the user may change the password.

password_expired @ Bool [get]

Whether the password has expired.

password_never_expires @ Bool [get]

Whether the password is exempt from expiry.

profile @ (fs.Path | nil) [get]

Profile path.

script_path @ (fs.Path | nil) [get]

Logon script path.

sid @ security.windows.Sid [get]

The account's SID.

user_comment @ (Str | nil) [get]

User-facing account comment.