Skip to content

AccountPolicy

The local password and account-lockout policy.

Returned by account_policy and update_account_policy.

Fields

force_logoff @ (time.Duration | nil)

Delay before users are forcibly logged off once their valid logon hours expire, or nil when forced logoff is disabled.

lockout_duration @ time.Duration

Time a locked account stays locked.

lockout_observation_window @ time.Duration

Time after which the failed-logon counter resets.

lockout_threshold @ Int

Failed logons allowed before lockout. Zero disables lockout.

max_password_age @ (time.Duration | nil)

Maximum password age, or nil when passwords do not expire.

min_password_age @ time.Duration

Minimum time before a password may be changed again.

min_password_length @ Int

Minimum number of characters a password must have.

password_history_length @ Int

Number of previous passwords retained.