Partilhar via


2.2.6.6 SAMPR_USER_ALL_INFORMATION

The SAMPR_USER_ALL_INFORMATION structure contains user attribute information. Most fields are described in section 2.2.6.1. The exceptions are described below.

 typedef struct _SAMPR_USER_ALL_INFORMATION {
   OLD_LARGE_INTEGER LastLogon;
   OLD_LARGE_INTEGER LastLogoff;
   OLD_LARGE_INTEGER PasswordLastSet;
   OLD_LARGE_INTEGER AccountExpires;
   OLD_LARGE_INTEGER PasswordCanChange;
   OLD_LARGE_INTEGER PasswordMustChange;
   RPC_UNICODE_STRING UserName;
   RPC_UNICODE_STRING FullName;
   RPC_UNICODE_STRING HomeDirectory;
   RPC_UNICODE_STRING HomeDirectoryDrive;
   RPC_UNICODE_STRING ScriptPath;
   RPC_UNICODE_STRING ProfilePath;
   RPC_UNICODE_STRING AdminComment;
   RPC_UNICODE_STRING WorkStations;
   RPC_UNICODE_STRING UserComment;
   RPC_UNICODE_STRING Parameters;
   RPC_SHORT_BLOB LmOwfPassword;
   RPC_SHORT_BLOB NtOwfPassword;
   RPC_UNICODE_STRING PrivateData;
   SAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor;
   unsigned long UserId;
   unsigned long PrimaryGroupId;
   unsigned long UserAccountControl;
   unsigned long WhichFields;
   SAMPR_LOGON_HOURS LogonHours;
   unsigned short BadPasswordCount;
   unsigned short LogonCount;
   unsigned short CountryCode;
   unsigned short CodePage;
   unsigned char LmPasswordPresent;
   unsigned char NtPasswordPresent;
   unsigned char PasswordExpired;
   unsigned char PrivateDataSensitive;
 } SAMPR_USER_ALL_INFORMATION,
  *PSAMPR_USER_ALL_INFORMATION;

LmOwfPassword: An RPC_SHORT_BLOB structure where Length and MaximumLength MUST be 16, and the Buffer MUST be formatted with an ENCRYPTED_LM_OWF_PASSWORD structure with the cleartext value being an LM hash, and the encryption key being the 16-byte SMB session key obtained as specified in either section 3.1.2.4 or section 3.2.2.3.

NtOwfPassword: An RPC_SHORT_BLOB structure where Length and MaximumLength MUST be 16, and the Buffer MUST be formatted with an ENCRYPTED_NT_OWF_PASSWORD structure with the cleartext value being an NT hash, and the encryption key being the 16-byte SMB session key obtained as specified in either section 3.1.2.4 or section 3.2.2.3.

PrivateData: Not used. Ignored on receipt at the server and client. Clients MUST set to zero when sent, and servers MUST set to zero on return.

SecurityDescriptor: Not used. Ignored on receipt at the server and client. Clients MUST set to zero when sent, and servers MUST set to zero on return.

WhichFields: A 32-bit bit field indicating which fields within the SAMPR_USER_ALL_INFORMATION structure will be processed by the server. Section 2.2.1.8 specifies the valid bits and also specifies the structure field to which each bit corresponds.

Note If a given bit is set, the associated field MUST be processed; if a given bit is not set, then the associated field MUST be ignored.

LmPasswordPresent: If zero, LmOwfPassword MUST be ignored; otherwise, LmOwfPassword MUST be processed.

NtPasswordPresent: If zero, NtOwfPassword MUST be ignored; otherwise, NtOwfPassword MUST be processed.

PrivateDataSensitive: Not used. Ignored on receipt at the server and client.