⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 net.html

📁 perl教程
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<dt><strong><a name="item_old__2d_scalar_string"><code>old</code> - Scalar String</a></strong>

<dd>
<p>The existing password for <code>user</code>.</p>
</dd>
</li>
<dt><strong><a name="item_new__2d_scalar_string"><code>new</code> - Scalar String</a></strong>

<dd>
<p>The new password for <code>user</code>.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="userdel_server__user_">UserDel(server, user)</a></h2>
<p>Deletes the specified <code>user</code> account. Administrator or Account Operator
privilege is required to execute this function.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> on which to delete the <code>user</code>.</p>
</dd>
</li>
<dt><strong><code>user</code> - Scalar String</strong>

<dd>
<p>The <code>user</code> account to delete.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="userenum_server__array___filter__">UserEnum(server, array[, filter])</a></h2>
<p>Enumerates all the accounts on server that satisfy <code>filter</code>. Unlike the
<code>NetUserEnum()</code> function in the API, this function does not allow you
to specify a level (internally it is hardcoded to 0). In Perl it is
trivial to implement the equivalent function (should you need it) - see
<a href="#example_1">Example 1</a>.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> on which to enumerate the accounts satisfying <code>filter</code>.</p>
</dd>
</li>
<dt><strong><a name="item_array__2d_array_reference"><code>array</code> - Array Reference</a></strong>

<dd>
<p>The array that will hold the names of all users on <code>server</code> whose
accounts match <code>filter</code>.</p>
</dd>
</li>
<dt><strong><a name="item_int"><code>filter</code> - Scalar Int (optional)</a></strong>

<dd>
<p>The filter to apply (see <a href="#user_enum_filter">USER ENUM FILTER</a>). This argument is optional
and if not present a default of <a href="#item_filter_normal_account"><code>FILTER_NORMAL_ACCOUNT</code></a> is used.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="usergetgroups_server__user__array_">UserGetGroups(server, user, array)</a></h2>
<p>Get the global groups for which <code>user</code> is a member. It returns the group
names in <code>array</code>. Unlike the <code>NetUserGetGroups()</code> function in the API,
this function does not allow you to specify a level (internally is
hardcoded to 0). In Perl it is trivial to implement the equivalent function
(in the unlikely event that you might need it).</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> from which to get the groups of which <code>user</code> is a member.</p>
</dd>
</li>
<dt><strong><code>user</code> - Scalar String</strong>

<dd>
<p>The <code>user</code> whose group membership you wish to examine.</p>
</dd>
</li>
<dt><strong><a name="item_array__2d_scalar_string"><code>array</code> - Scalar String</a></strong>

<dd>
<p>The array that will contain the group names to which <code>user</code> belongs.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="usergetinfo_server__user__level__hash_">UserGetInfo(server, user, level, hash)</a></h2>
<p>Returns the information at the specified <code>level</code> for the named <code>user</code>
in <code>hash</code>.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> from which to get the requested information about <code>user</code>.</p>
</dd>
</li>
<dt><strong><code>user</code> - Scalar String</strong>

<dd>
<p>The <code>user</code> whose information you want.</p>
</dd>
</li>
<dt><strong><code>level</code> - Scalar Int</strong>

<dd>
<p>One of: 0, 1, 2, 3, 10, 11 and 20. See <a href="#user_info_levels">USER INFO LEVELS</a>.</p>
</dd>
</li>
<dt><strong><code>hash</code> - Hash Reference</strong>

<dd>
<p>The hash that will contain the keys and values for the information
requested. See <a href="#user_info_fields">USER INFO FIELDS</a> for information about which keys are
present in a given level.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="usergetlocalgroups_server__user__array___flags__">UserGetLocalGroups(server, user, array[, flags])</a></h2>
<p>Gets the names of the local groups of which <code>user</code> is a member. Unlike
the <code>NetUserEnum()</code> function in the API, this function does not allow you
to specify a level. Since the underlying API restricts you to level 0 there
really isn't any need to include it...</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The server from which to get the local groups of which <code>user</code> is a member.</p>
</dd>
</li>
<dt><strong><code>user</code> - Scalar String</strong>

<dd>
<p>The <code>user</code> whose local group membership you wish to enumerate.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>

<dd>
<p>The array that will hold the names of the local groups to which <code>user</code>
belongs.</p>
</dd>
</li>
<dt><strong><a name="item_flags__2d_scalar_int__3cem_3e_28optional_29_3c_2fe"><a href="../../lib/Pod/perlfunc.html#item_flags"><code>flags</code></a> - Scalar Int &lt;em&gt;(optional)&lt;/em&gt;</a></strong>

<dd>
<p>Either <code>Win32API::Net::LG_INCLUDE_INDIRECT()</code> or 0. if <a href="../../lib/Pod/perlfunc.html#item_flags"><code>flags</code></a> is
omitted, the function internally uses 0. Specifying <code>LG_INCLUDE_INDIRECT()</code>
will include in the list the names of the groups of which the <code>user</code> is
indirectly a member (e.g. by being in a global group that is a member of a
local group).</p>
</dd>
<dd>
<p>This field can take no other values.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="usermodalsget__"><code>UserModalsGet()</code></a></h2>
<p>This function is not currently implemented.</p>
<p>
</p>
<h2><a name="usermodalsset__"><code>UserModalsSet()</code></a></h2>
<p>This function is not currently implemented.</p>
<p>
</p>
<h2><a name="usersetgroups_server__user__array_">UserSetGroups(server, user, array)</a></h2>
<p>Sets the (global) group membership for <code>user</code> to the specified groups.
Unlike the API function <code>NetUserSetGroups()</code>, this function does not take a
<code>level</code> parameter (mainly because this option is largely redundant).</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> on which you wish to set the group membership for <code>user</code>.</p>
</dd>
</li>
<dt><strong><code>user</code> - Scalar String</strong>

<dd>
<p>The <code>user</code> whose group membership you wish to set.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>

<dd>
<p>The array containing the (global) group names to set the <code>user</code>s
membership of.</p>
</dd>
</li>
</dl>
<p>This function will fail if any of the group names specified do not exist.</p>
<p>
</p>
<h2><a name="usersetinfo_server__user__level__hash__error_">UserSetInfo(server, user, level, hash, error)</a></h2>
<p>Sets the info for <code>user</code> according to the information contained in <code>hash</code>
for <code>level</code> (see <a href="#user_info_levels">USER INFO LEVELS</a>).</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> on which you wish to change the info for <code>user</code>.</p>
</dd>
</li>
<dt><strong><code>user</code> - Scalar String</strong>

<dd>
<p>The <code>user</code> whose info you wish to change.</p>
</dd>
</li>
<dt><strong><code>level</code> - Scalar Int</strong>

<dd>
<p>One of 0, 1, 2, 3, or 20 (according to Microsoft documentation). In
practice, you can use all the 10xx levels as well to change most of the
individual properties of the named <code>user</code> - although this may not be
supported in future...</p>
</dd>
</li>
<dt><strong><code>hash</code> - Hash Reference</strong>

<dd>
<p>The hash that will contain the necessary key/value pairs required for
<code>level</code> (see <a href="#user_info_levels">USER INFO LEVELS</a>).</p>
</dd>
</li>
<dt><strong><code>error</code> - Scalar Int</strong>

<dd>
<p>Provides information on which field in <code>hash</code> were not properly
specified. See <a href="#user_field_errors">USER FIELD ERRORS</a> for more information about what
values can be returned in this field.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="net_group_functions">NET GROUP FUNCTIONS</a></h1>
<p>The <code>Group*()</code> functions all operate only on global groups. To modify
local groups, use the corresponding <code>LocalGroup*()</code> functions.</p>
<p>Administrator or Account Operator group membership is required to
successfully execute most of these functions on a remote server or on
a computer that has local security enabled.</p>
<p>The <code>server</code> field can be the empty string, in which case the function
defaults to running on the local computer. If you leave this field blank
then you should ensure that you are running the function on a PDC or BDC
for your current domain. Use the support function <code>GetDCName()</code> to find out
what the domain controller is, should you not be running this on the PDC.</p>
<p>The following functions are available.</p>
<p>
</p>
<h2><a name="groupadd_server__level__hash__error_">GroupAdd(server, level, hash, error)</a></h2>
<p>Adds the specified group.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> on which to add the group.</p>
</dd>
</li>
<dt><strong><a name="item_level__2d_scalar_string"><code>level</code> - Scalar String</a></strong>

<dd>
<p>The <code>level</code> of information contained in <code>hash</code>. This can be one of 0, 1
or 2. See <a href="#group_info_levels">GROUP INFO LEVELS</a>.</p>
</dd>
</li>
<dt><strong><code>hash</code> - Hash Reference</strong>

<dd>
<p>A hash containing the required key/value pairs for <code>level</code>.</p>
</dd>
</li>
<dt><strong><code>error</code> - Scalar Int</strong>

<dd>
<p>Provides information on which field in <code>hash</code> was not properly specified.
See <a href="#group_field_errors">GROUP FIELD ERRORS</a> for more information about what values can be
returned in this field.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="groupadduser_server__group__user_">GroupAddUser(server, group, user)</a></h2>
<p>Adds the specified <code>user</code> to the specified <code>group</code>.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> on which to add the <code>user</code> to <code>group</code>.</p>
</dd>
</li>
<dt><strong><a name="item_group__2d_scalar_string"><code>group</code> - Scalar String</a></strong>

<dd>
<p>The <code>group</code> to add the <code>user</code> to.</p>
</dd>
</li>
<dt><strong><code>user</code> - Scalar String</strong>

<dd>
<p>The <code>user</code> to add to <code>group</code>.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="groupdel_server__group_">GroupDel(server, group)</a></h2>
<p>Deletes the specified global group.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> on which to delete the named <code>group</code>.</p>
</dd>
</li>
<dt><strong><a name="item_group__2dscalar_string"><code>group</code> -Scalar String</a></strong>

<dd>
<p>The <code>group</code> to delete.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="groupdeluser_server__group__user_">GroupDelUser(server, group, user)</a></h2>
<p>Deletes the specified user from the specified group.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>

<dd>
<p>The <code>server</code> on which to delete <code>user</code> from <code>group</code>.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>

<dd>
<p>The <code>group</code> from which to delete <code>user</code>.</p>
</dd>
</li>
<dt><strong><code>user</code> - Scalar String</strong>

<dd>
<p>The <code>user</code> to delete from <code>group</code>.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="groupenum_server__array_">GroupEnum(server, array)</a></h2>
<p>Enumerates all the global groups on the server. Unlike the API call

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -