Partager via


2.5.10.4.3 NetWkstaUserLogonResponseData Data Structure

The NetWkstaUserLogonResponseData packet is used in the RAPOutData field of the SMB_COM_TRANSACTION response.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Code

EffName (21 bytes)

...

...

...

Pad1

Priv

AuthFlags

...

NumLogons

BadPWCount

LastLogon

...

LastLogoff

...

LogoffTime

...

KickoffTime

...

PasswordAge

...

PWCanChange

...

PWMustChange

...

Computer

...

Domain

...

ScriptPath

...

Reserved1

...

Code (2 bytes): Code specifies the result and can have the following values.

Value

Meaning

NERR_Success

0

No errors encountered.

ERROR_ACCESS_DENIED

5

User has insufficient privilege.

NERR_LogonScriptError

2212

An error occurred while loading or running the logon script.

NERR_StandaloneLogon

2214

The logon was not validated by any server.

NERR_NonValidatedLogon

2217

The logon server is running an older software version and cannot validate the logon.

NERR_InvalidWorkstation

2240

The user is not allowed to log on from this computer.

NERR_InvalidLogonHours

2241

The user is not allowed to log on at this time.

NERR_PasswordExpired

2242

Administrator privilege.

EffName (21 bytes): MUST be a null-terminated ASCII string that specifies the account to which the user was logged on.

Pad1 (1 byte): Aligns the next data structure element to a word boundary. SHOULD be set to zero when sent and MUST be ignored on receipt.

Priv (2 bytes): A 16-bit, unsigned integer that specifies the user's privilege level. The possible values are as follows.

Value

Meaning

USER_PRIV_GUEST

0

Guest privilege

USER_PRIV_USER

1

User privilege

USER_PRV_ADMIN

2

Administrator privilege

AuthFlags (4 bytes): A 32-bit unsigned integer that specifies the account operator privileges. The possible values are as follows. <64>

Value

Meaning

AF_OP_PRINT

0

Print operator

AF_OP_COMM

1

Communications operator

AF_OP_SERVER

2

Server operator

AF_OP_ACCOUNTS

3

Accounts operator

NumLogons (2 bytes): A 16-bit, unsigned integer that specifies the number of times this user has logged on. A value of 0xffff means the number of logons is unknown.

BadPWCount (2 bytes): A 16-bit, unsigned integer that specifies the number of incorrect passwords entered since the last successful logon.

LastLogon (4 bytes): A 32-bit unsigned integer that specifies the time when the user last logged on. This value is stored as the number of seconds since midnight January 1, 1970, Coordinated Universal Time (UTC).

LastLogoff (4 bytes): A 32-bit unsigned integer that specifies the time when the user last logged off. This value is stored as the number of seconds since midnight January 1, 1970, Coordinated Universal Time (UTC). A value of 0 means the last logoff time is unknown.

LogoffTime (4 bytes): A 32-bit unsigned integer that specifies the time when the user is to log off. This value is stored as the number of seconds since midnight January 1, 1970, Coordinated Universal Time (UTC). A value of -1 means the user never has to log off.

KickoffTime (4 bytes): A 32-bit unsigned integer that specifies the time when the user will be logged off by the system. This value is stored as the number of seconds since midnight January 1, 1970, Coordinated Universal Time (UTC). A value of -1 means the system will never log off the user.

PasswordAge (4 bytes): A 32-bit integer that specifies the time in seconds since the user last changed his or her password.

PWCanChange (4 bytes): A 32-bit unsigned integer that specifies the time when the user can change the password. This value is stored as the number of seconds since midnight January 1, 1970, Coordinated Universal Time (UTC). A value of -1 means the user can never change the password.

PWMustChange (4 bytes): A 32-bit unsigned integer that specifies the time when the user must change the password. This value is stored as the number of seconds since midnight January 1, 1970, Coordinated Universal Time (UTC).

Computer (4 bytes): MUST be a pointer to a null-terminated ASCII string that specifies the computer where the user is logged on.

Domain (4 bytes): MUST be a pointer to a null-terminated ASCII string that specifies the domain at which the user is logged on.

ScriptPath (4 bytes): MUST be a pointer to a null-terminated ASCII string that specifies the relative path to the user logon script.

Reserved1 (4 bytes): An unused value. SHOULD be set to zero when sent and MUST be ignored on receipt.