2.5.8.3.3 NetUserInfo2 Data Structure

The NetUserInfo2 packet contains the following fields.


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

Name (21 bytes)

...

...

...

Pad

Password (16 bytes)

...

...

...

PasswordAge

...

Priv

HomeDirLow

HomeDirHigh

CommentLow

CommentHigh

Flags

ScriptPathLow

ScriptPathHigh

AuthFlags

...

FullNameLow

FullNameHigh

UsrCommentLow

UsrCommentHigh

pParmsLow

pParmsHigh

WorkStationsLow

WorkStationsHigh

LastLogon

...

LastLogOff

...

AcctExpires

...

MaxStorage

...

UnitsPerWeek

LogonHoursLow

LogonHoursHigh

BadPwCount

NumLogons

LogonServerLow

LogonServerHigh

CountryCode

CodePage

Name (21 bytes): A null-terminated ASCII string that specifies the user name for which information is retrieved.

Pad (1 byte): A pad byte. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

Password (16 bytes): A 16-byte field filled with zeros.

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

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.

HomeDirLow (2 bytes): A pointer to a null-terminated ASCII string that contains the path name of the user's home directory. Before using this value, the Remote Administration Protocol client MUST subtract the Converter field specified in section 2.5.2 from the HomeDirLow value, and then use that result as the offset within the response.

HomeDirHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

CommentLow (2 bytes): MUST be a pointer to a null-terminated ASCII string that specifies the comment. Before using this value, the Remote Administration Protocol client MUST subtract the Converter field specified in section 2.5.2 from the CommentLow value, and then use that result as the offset within the response.

CommentHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

Flags (2 bytes): Possible values for user account types are as follows.

Value

Meaning

UF_TEMP_DUPLICATE_ACCOUNT

0x0100

This is an account for users whose primary account is in another domain. This account provides user access to this domain, but not to any domain that trusts this domain. Also known as a local user account.

UF_NORMAL_ACCOUNT

0x0200

This is a default account type that represents a typical user.

UF_INTERDOMAIN_TRUST_ACCOUNT

0x0800

This is a permit to trust account for a system domain that trusts other domains.

UF_WORKSTATION_TRUST_ACCOUNT

0x1000

This is a computer account for a computer that is a member of this domain.

UF_SERVER_TRUST_ACCOUNT

0x2000

This is a computer account for a system backup domain controller that is a member of this domain.

UF_MACHINE_ACCOUNT_MASK

0x3800

Machine account mask

UF_ACCOUNT_TYPE_MASK

0x380A

Account type mask

ScriptPathLow (2 bytes): A pointer to a null-terminated ASCII string that specifies the path for user's logon script.

ScriptPathHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

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

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.

FullNameLow (2 bytes): MUST be a pointer to a null-terminated ASCII string that specifies the full name of the user. Before using this value, the Remote Administration Protocol client MUST subtract the Converter field specified in section 2.5.2 from the FullNameLow value, and then use that result as the offset within the response.

FullNameHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

UsrCommentLow (2 bytes): Before using this value, the Remote Administration Protocol client MUST subtract the Converter field specified in section 2.5.2 from the UserCommentLow value, and then use that result as the offset within the response.

UsrCommentHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

pParmsLow (2 bytes): A pointer to a null-terminated ASCII string that is set aside for use by applications. Before using this value, the Remote Administration Protocol client MUST subtract the Converter field specified in section 2.5.2 from the ParmsLow value, and then use that result as the offset within the response.

pParmsHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

WorkStationsLow (2 bytes): A pointer to a null-terminated ASCII string that contains the names of workstations the user can log on from. There can be up to eight workstations, with the names separated by commas. A null string indicates there are no restrictions.

WorkStationsHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

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.

AcctExpires (4 bytes): A 32-bit unsigned integer that specifies the time when the user account expires. This value is stored as the number of seconds since midnight January 1, 1970, Coordinated Universal Time (UTC). A value of 0xFFFFFFFF indicates that the user account never expires.

MaxStorage (4 bytes): A 32-bit unsigned integer that specifies the maximum amount of disk space the user can occupy. A value of 0xffffffff indicates there are no restrictions.

UnitsPerWeek (2 bytes): A 16-bit unsigned integer that specifies the equal number of time units into which a week is divided. This value MUST be set to 168.

LogonHoursLow (2 bytes): A pointer to a 21-byte array where each bit specifies the time during which the user can log on. Each bit represents one unique hour in a week. The first bit (bit 0, word 0) is Sunday, 0:00 to 0:59; the second bit (bit 1, word 0) is Sunday, 1:00 to 1:59; and so on. All bits set to 0 indicate there are no restrictions.

Before using this value, the Remote Administration Protocol client MUST subtract the Converter field specified in section 2.5.2 from the LogonHours value, and then use that result as the offset within the response.

LogonHoursHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

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

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

LogonServerLow (2 bytes): A pointer to a null-terminated ASCII string that contains the name of the server to which logon requests are sent. A null string that indicates logon requests MUST be sent to the domain controller. Before using this value, the Remote Administration Protocol client MUST subtract the Converter field specified in section 2.5.2 from the LogonServer value, and then use that result as the offset within the response.

LogonServerHigh (2 bytes): Unused. Can be set to any arbitrary value when sent, and MUST be ignored on receipt.

CountryCode (2 bytes): A 16-bit unsigned integer that specifies the country code for the user's language of choice.

CodePage (2 bytes): A 16-bit unsigned integer that specifies the code page for the user's language of choice.