Returns information about an account [e.g. a user or group] or a SID [e.g. Security Identifier].
wntAcctInfo( server-name, account-name, request[, flags])
(s) server-name: Name of a network file server or empty string ("") to indicate the current machine.
(s) account-name: Name of a user or a group about which information is to be obtained.
(i) request: Specifies the information to be returned. See below.
(i) flags: [optional] Controls behavior of the function. See below.
(s) Information about an account
Server
When requesting information about domain accounts or for a SID belonging to a domain account, the server-name parameter must contain the name of a domain controller for the domain in which the specified account or SID is located.
Request
Different request #'s cause this function to return different types of information for the account that has been specified. This table lists the valid request #'s and the information that they return, as well as the flag bit mask values that are valid for each request #.
Request |
Returns |
0 |
Domain where the specified account name is found. The 'flags' parameter may be specified as zero '0' or omitted.
|
1 |
SID [e.g. Security Identifier] of the account in standard text format. The 'flags' paramater may be specified as zero '0' or omitted.
|
2 |
The value of the "account-name" parameter contains a SID value instead of an account name. This function will return the account-name associated with this SID value. The flags bit mask value is used to determine whether or not domain name information is also returned along with the account name.
The following flags bit mask values are valid: |
Flag bit number |
Flag bit value when set/enabled |
Flag bit meaning |
0 |
1 |
When this flag bit is enabled, domain names will be prefixed onto the returned account names [e.g. "domain\user" or "domain\group"]. If this flag bit is disabled then only the account names themselves will be returned.
|
1 |
2 |
When this flag bit is enabled in conjunction with flag bit #0, it allows all domain names to be returned, including built-in domain names such as "BUILTIN" and "NT AUTHORITY". Under normal circumstances, these built-in domain names do not need to be returned, and enabling flag bit #0 and disabling flag bit #1 will result in only returning real domain names and computer names, but not built-in domain names. |
Flags
The flags value is an integer bit mask value. The values of different flag bits may be bit-wise OR'd together if multiple flag bits are to be "set" [e.g. enabled] at the same time. The flag bits that are valid will vary based on the request # that has been specified. Refer to the help text for the 'request' parameter for more information regarding the valid flags bit mask values.
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
AccountDomain = wntAcctInfo( "\\MyServer", "jdoe", 0) Message("Account 'jdoe' is in domain '",AccountDomain,"'.") AccountSID = wntAcctInfo("\\MyServer", "jdoe", 1) Message("Account 'jdoe' has the SID value '",AccountSID,"'.") AccountName = wntAcctInfo("\\MyServer", AccountSID, 2, 1) Message("SID '",AccountSID,"' has the account name '",AccountName,"'.") Exit
wntUserInfo(), About SID [Security Identifier] values…, Extender Limitiations