User Logon Level 1
struct user_logon_info_1 {
unsigned short usrlog1_code;
unsigned char usrlog1_eff_name[UNLEN+1];
unsigned char usrlog1_pad_1;
unsigned short usrlog1_priv;
unsigned long usrlog1_auth_flags;
unsigned short usrlog1_num_logons;
unsigned short usrlog1_bad_pw_count;
unsigned long usrlog1_last_logon;
unsigned long usrlog1_last_logoff;
unsigned long usrlog1_logoff_time;
unsigned long usrlog1_kickoff_time;
long usrlog1_password_age;
unsigned long usrlog1_pw_can_change;
unsigned long usrlog1_pw_must_change;
unsigned char LSFAR * LSPTR usrlog1_computer;
unsigned char LSFAR * LSPTR usrlog1_domain;
unsigned char LSFAR * LSPTR usrlog1_script_path;
unsigned long usrlog1_reserved1;
};
where:
- usrlog1_code specifies a response from the
API, according to the following values: ┌─────────────────────────────┬───────┬────────────────────────────────────────┐
│ SYMBOLIC CONSTANT │ VALUE │ MEANING │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ VALIDATED_LOGON │ 0 │ No errors were encountered. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_ACCESS_DENIED │ 5 │ The username and password do not cor-
│
│ │ │ respond to an active account. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NonValidatedLogon │ 2217 │ The logon server could not validate
│
│ │ │ the logon. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InvalidRequester │ 2240 │ The user is not allowed to log on from
│
│ │ │ this requester. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InvalidLogonHours │ 2241 │ The user is not allowed to log on
at │
│ │ │ this time. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_PasswordExpired │ 2242 │ The password has expired. │
└─────────────────────────────┴───────┴────────────────────────────────────────┘
- The second and third fields in the user_logon_info_1
are identical to the corresponding fields in the previous level.
- usrlog1_priv specifies the user's privilege
level. It can be one of the following: ┌────────────────────┬───────┬─────────────────────────────────────────────────┐
│ SYMBOLIC CONSTANT │ VALUE │ PRIVILEGE │
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ USER_PRIV_GUEST │ 0 │ Guest │
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ USER_PRIV_USER │ 1 │ User │
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ USER_PRIV_ADMIN │ 2 │ Administrator │
└────────────────────┴───────┴─────────────────────────────────────────────────┘
- usrlog1_auth_flags grants operator rights (accounts,
print, comm, and server) to users, both locally and remotely. See the chart
about operator privileges at topic User
Account Information Level 2.
- usrlog1_num_logons is the number of instances
of logons to the account. A value of -1 means the number of logons is unknown.
- usrlog1_bad_pw_count is the number of attempts
to validate a bad password. A value of -1 means the number is unknown.
- usrlog1_last_logon is the time and date (seconds
since 1 January 1970) the user last logged on.
- usrlog1_last_logoff is the time and date (seconds
since 1 January 1970) when the last logoff occurred. A value of 0 means
the time is unknown.
- usrlog1_logoff_time is the time (in seconds)
and date (since 1 January 1970) when the user should log off. A value of
USER_NO_LOGOFF means the user never has to log off. The constant USER_NO_LOGOFF
is defined in the ACCESS.H header file.
- usrlog1_kickoff_time is the time (in seconds)
when the user will be logged off. A value of USER_NO_LOGOFF means the user
will not be logged off by the system. The constant USER_NO_LOGOFF is defined
in the ACCESS.H header file.
- usrlog1_password_age is the time (in seconds)
since the password last was changed.
- usrlog1_pw_can_change is the time (in seconds)
and date (since 1 January 1970) when the user can change his password. A
value of TIMEQ_FOREVER, as defined in the ACCESS.H header file, means the
user never can change the password.
- usrlog1_pw_must_change is the time (in seconds)
and the date (since 1 January 1970) when the password must be changed.
- usrlog1_computer is the server that validated
the user's logon.
- usrlog1_domain is the domain to which the user
currently is logged on.
- usrlog1_script_path is the relative path to
the logon script of an account.
- usrlog1_reserved1 is reserved and cannot be
used.
[Back: User Logon Level 0]
[Next: User Logon Level 2]