📄 net.html
字号:
</dd>
</li>
<dt><strong><a name="item_integers"><code>logonHours</code> - Reference to Array of Integers (length 21 elements)</a></strong>
<dd>
<p>The times at which the user can logon. This should be an integer array
with 21 elements. Each element represents an 8 hour period and each bit
represents represents an hour. Only the lower byte of each integer is
used. If this is left undefined then no restrictions are placed on the
account.</p>
</dd>
</li>
<dt><strong><a name="item_logonserver__2d_scalar_string"><code>logonServer</code> - Scalar String</a></strong>
<dd>
<p>The logon server for this user. Under Windows NT, this value cannot be
set and will always have the value '\\*' when queried.</p>
</dd>
</li>
<dt><strong><a name="item_maxstorage__2d_scalar_int"><code>maxStorage</code> - Scalar Int</a></strong>
<dd>
<p>The current release of Windows NT does not implement disk quotas so
it is believed that the value of this key is ignored.</p>
</dd>
</li>
<dt><strong><a name="item_name__2d_scalar_string"><code>name</code> - Scalar String</a></strong>
<dd>
<p>The user name that this request applies to. Most of the functions take
the user name as a separate argument. In general, the user name provided
should be the same as that in the one provided in the hash.</p>
</dd>
</li>
<dt><strong><a name="item_numlogons__2d_scalar_int"><code>numLogons</code> - Scalar Int</a></strong>
<dd>
<p>The number of times that the named user has successfully logged on to
this machine/domain.</p>
</dd>
</li>
<dt><strong><a name="item_parms__2d_scalar_string"><code>parms</code> - Scalar String</a></strong>
<dd>
<p>The value of this key can be used by applications. There are none known
to to author that use it, although it could be used to hold adminitrative
information.</p>
</dd>
</li>
<dt><strong><a name="item_password__2d_scalar_string"><code>password</code> - Scalar String</a></strong>
<dd>
<p>The password to be set. The password is never returned in a <code>UserGet()</code>
operation.</p>
</dd>
</li>
<dt><strong><code>passwordAge</code> - Scalar Int (UTC)</strong>
<dd>
<p>The current age of the password (stored as the number of seconds since
00:00:00, 1st January 1970).</p>
</dd>
</li>
<dt><strong><a name="item_passwordexpired__2d_scalar_int"><code>passwordExpired</code> - Scalar Int</a></strong>
<dd>
<p>The value of this key is used in two different ways. When queried via
<code>UserGetInfo()</code> the return value is 0 is the password has not expired
and 1 if it has. When setting the value via <code>UserAdd()</code> or
<code>UserSetInfo()</code> a value of 0 indicates that the users' password has
not expired whereas a value of 1 will force the user to change their
password at the next logon.</p>
</dd>
</li>
<dt><strong><a name="item_primarygroupid__2d_scalar_int"><code>primaryGroupId</code> - Scalar Int</a></strong>
<dd>
<p>The id of the primary group that this user belongs to. When creating
accounts with <code>UserAdd()</code> you should use a value of 0x201.</p>
</dd>
</li>
<dt><strong><code>priv</code> - Scalar Int (Bitwise OR of USER_PRIVILEGE_FLAGS)</strong>
<dd>
<p>The privilege level that this user has. This is never returned from a
<code>UserGet()</code> call. See <a href="#user_privilege_flags">USER PRIVILEGE FLAGS</a>.</p>
</dd>
</li>
<dt><strong><a name="item_profile__2d_scalar_string"><code>profile</code> - Scalar String</a></strong>
<dd>
<p>The profile that is associated with the named user. This can be UNC path,
a local path or undefined.</p>
</dd>
</li>
<dt><strong><a name="item_scriptpath__2d_scalar_string"><code>scriptPath</code> - Scalar String</a></strong>
<dd>
<p>The path to the logon script for this user. This should be specified as a
relative path and will cause the logon script to be run from (relative
location) in the logon servers export directory.</p>
</dd>
</li>
<dt><strong><a name="item_unitsperweek__2d_scalar_int"><code>unitsPerWeek</code> - Scalar Int</a></strong>
<dd>
<p>The value of this key represents the granularity of the logonHours array.
Its use is beyond the scope of this package.</p>
</dd>
</li>
<dt><strong><a name="item_usrcomment__2d_scalar_string"><code>usrComment</code> - Scalar String</a></strong>
<dd>
<p>The user comment field (contrasted with the comment field ;-).</p>
</dd>
</li>
<dt><strong><a name="item_workstations__2d_scalar_string"><code>workstations</code> - Scalar String</a></strong>
<dd>
<p>A comma-separated string containing upto 8 workstation that the named
user can login to. Setting a value for this key will then allow the
named user to login to only those computers named.</p>
</dd>
</li>
<dt><strong><a name="item_userid__2d_scalar_int"><code>userId</code> - Scalar Int</a></strong>
<dd>
<p>The user id associated with this user This value is generated by the
system and cannot be set or changed using the <code>UserAdd()</code> or
<code>UserSetInfo()</code> calls.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="user_flags">USER FLAGS</a></h1>
<p>The following is an alphabetical listing of the user flags.
The <a href="../../lib/Pod/perlfunc.html#item_flags"><code>flags</code></a> key (see <a href="#user_info_fields">USER INFO FIELDS</a>) should be the bitwise OR of one
or more of these values.</p>
<dl>
<dt><strong><a name="item_uf_accountdisable"><code>UF_ACCOUNTDISABLE()</code></a></strong>
<dd>
<p>This account has been disabled.</p>
</dd>
</li>
<dt><strong><a name="item_uf_dont_expire_passwd"><code>UF_DONT_EXPIRE_PASSWD()</code></a></strong>
<dd>
<p>Never expire the password on this account.</p>
</dd>
</li>
<dt><strong><a name="item_uf_homedir_required"><code>UF_HOMEDIR_REQUIRED()</code></a></strong>
<dd>
<p>A home directory must be specified (ignored for NT).</p>
</dd>
</li>
<dt><strong><a name="item_uf_interdomain_trust_account"><code>UF_INTERDOMAIN_TRUST_ACCOUNT()</code></a></strong>
<dd>
<p>The account represents a interdomain trust account.</p>
</dd>
</li>
<dt><strong><a name="item_uf_lockout"><code>UF_LOCKOUT()</code></a></strong>
<dd>
<p>Lock out this account (or this account has been locked out due to
security policy - i.e. badLogonCount is greater than your policy allows).
This value can be cleared but not set by a <code>UserSetInfo()</code> call.</p>
</dd>
</li>
<dt><strong><a name="item_uf_normal_account"><code>UF_NORMAL_ACCOUNT()</code></a></strong>
<dd>
<p>The account is a normal user account.</p>
</dd>
</li>
<dt><strong><a name="item_uf_passwd_cant_change"><code>UF_PASSWD_CANT_CHANGE()</code></a></strong>
<dd>
<p>The password for this account cannot be changed (execpt by an Administrator
using one of the above calls).</p>
</dd>
</li>
<dt><strong><a name="item_uf_passwd_notreqd"><code>UF_PASSWD_NOTREQD()</code></a></strong>
<dd>
<p>A password is not required for this account.</p>
</dd>
</li>
<dt><strong><a name="item_uf_script"><code>UF_SCRIPT()</code></a></strong>
<dd>
<p>This <strong>must be set when creating account on Windows NT.</p>
</dd>
</li>
<dt><strong><a name="item_uf_server_trust_account"><code>UF_SERVER_TRUST_ACCOUNT()</code></a></strong>
<dd>
<p>The account represents a Windows NT Backup Domain Controller account in
the domain.</p>
</dd>
</li>
<dt><strong><a name="item_uf_temp_duplicate_account"><code>UF_TEMP_DUPLICATE_ACCOUNT()</code></a></strong>
<dd>
<p>To quote the Microsoft Documentation <em>&quot;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.
The User Manager refers to this account type as a local user account.</p>
</dd>
</li>
<dt><strong><a name="item_uf_workstation_trust_account"><code>UF_WORKSTATION_TRUST_ACCOUNT()</code></a></strong>
<dd>
<p>The account represents a computer account for a workstation or server in
the domain.</p>
</dd>
</li>
</dl>
<p>Please note that these are implemented as functions and are therefore
called in the same way as other functions. You should typically use them
like:</p>
<pre>
<span class="variable">$ufScript</span> <span class="operator">=</span> <span class="variable">Win32API::Net::UF_SCRIPT</span><span class="operator">();</span>
</pre>
<p>
</p>
<hr />
<h1><a name="user_privilege_flags">USER PRIVILEGE FLAGS</a></h1>
<p>These following values are used in the <code>priv</code> key. This field is never
initialised on a <code>UserGet*()</code> call and once set cannot be changed in a
<code>UserSetInfo()</code> call.</p>
<dl>
<dt><strong><a name="item_user_priv_admin"><code>USER_PRIV_ADMIN()</code></a></strong>
<dd>
<p>Account is an an administrative account.</p>
</dd>
</li>
<dt><strong><a name="item_user_priv_guest"><code>USER_PRIV_GUEST()</code></a></strong>
<dd>
<p>Account is a guest account.</p>
</dd>
</li>
<dt><strong><a name="item_user_priv_user"><code>USER_PRIV_USER()</code></a></strong>
<dd>
<p>Account is a user account.</p>
</dd>
</li>
</dl>
<p>Please note that these are implemented as functions and are therefore
called in the same way as other functions. You should typically use them
like:</p>
<pre>
<span class="variable">$userPrivUser</span> <span class="operator">=</span> <span class="variable">Win32API::Net::USER_PRIV_USER</span><span class="operator">();</span>
</pre>
<p>
</p>
<hr />
<h1><a name="user_enum_filter">USER ENUM FILTER</a></h1>
<p>These flags are used in the <code>UserEnum()</code> function to specify which
accounts to retrieve. It should be a bitwise OR of some (or all) of
the following.</p>
<dl>
<dt><strong><a name="item_filter_temp_duplicate_account"><code>FILTER_TEMP_DUPLICATE_ACCOUNT()</code></a></strong>
<dd>
<p>Show temporary duplicate account (one presumes).</p>
</dd>
</li>
<dt><strong><a name="item_filter_normal_account"><code>FILTER_NORMAL_ACCOUNT()</code></a></strong>
<dd>
<p>Show normal user account.</p>
</dd>
</li>
<dt><strong><a name="item_filter_interdomain_trust_account"><code>FILTER_INTERDOMAIN_TRUST_ACCOUNT()</code></a></strong>
<dd>
<p>Show interdomain trust accounts.</p>
</dd>
</li>
<dt><strong><a name="item_filter_workstation_trust_account"><code>FILTER_WORKSTATION_TRUST_ACCOUNT()</code></a></strong>
<dd>
<p>Show workstation trust accounts.</p>
</dd>
</li>
<dt><strong><a name="item_filter_server_trust_account"><code>FILTER_SERVER_TRUST_ACCOUNT()</code></a></strong>
<dd>
<p>Show server trust accounts.</p>
</dd>
</li>
</dl>
<p>Please note that these are implemented as functions and are therefore
called in the same way as other functions. You should typically use them
like:</p>
<pre>
<span class="variable">$filterNormalAccounts</span> <span class="operator">=</span> <span class="variable">Win32API::Net::FILTER_NORMAL_ACCOUNT</span><span class="operator">();</span>
</pre>
<p>
</p>
<hr />
<h1><a name="user_field_errors">USER FIELD ERRORS</a></h1>
<p>For the <code>User*()</code> functions that take an <code>error</code> parameter this variable
will, on failure, contain one of the following constants. Note that the
function may fail because more than one key/value was missing from the
input hash. You will only find out about the first one that was incorrectly
specified. This is only really useful in debugging.</p>
<dl>
<dt><strong><a name="item_user_acct_expires_parmnum"><code>USER_ACCT_EXPIRES_PARMNUM()</code></a></strong>
<dd>
<p><code>acctExpires</code> field was absent or not correctly specified.</p>
</dd>
</li>
<dt><strong><a name="item_user_auth_flags_parmnum"><code>USER_AUTH_FLAGS_PARMNUM()</code></a></strong>
<dd>
<p><code>authFlags</code> field was absent or not correctly specified.</p>
</dd>
</li>
<dt><strong><a name="item_user_bad_pw_count_parmnum"><code>USER_BAD_PW_COUNT_PARMNUM()</code></a></strong>
<dd>
<p><code>badPasswordCount</code> field was absent or not correctly specified.</p>
</dd>
</li>
<dt><strong><a name="item_user_code_page_parmnum"><code>USER_CODE_PAGE_PARMNUM()</code></a></strong>
<dd>
<p><code>codePage</code> field was absent or not correctly specified.</p>
</dd>
</li>
<dt><strong><a name="item_user_comment_parmnum"><code>USER_COMMENT_PARMNUM()</code></a></strong>
<dd>
<p><code>comment</code> field was absent or not correctly specified.</p>
</dd>
</li>
<dt><strong><a name="item_user_country_code_parmnum"><code>USER_COUNTRY_CODE_PARMNUM()</code></a></strong>
<dd>
<p><code>countryCode</code> field was absent or not correctly specified.</p>
</dd>
</li>
<dt><strong><a name="item_user_flags_parmnum"><code>USER_FLAGS_PARMNUM()</code></a></strong>
<dd>
<p><a href="../../lib/Pod/perlfunc.html#item_flags"><code>flags</code></a> field was absent or not correctly specified.</p>
</dd>
</li>
<dt><strong><a n
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -