22.10. Win32::NetAdminThe Win32::NetAdmin module provides extensive functionality for administering users and groups on Windows NT servers. This module does not implement an object interface for administration; it exports several functions that execute administrative commands. (This module does not load on Windows 95 systems.) The following functions are provided by the Win32::NetAdmin module. The server argument of each function is optional; however, a placeholder for the argument must be used if you don't supply a name. An empty string ("") will work, indicating that the local machine should be used.
GetDomainController (server, domain, $name) Returns the name of the domain controller for the specified serverand domain to the variable $name.
GroupAddUsers (server, name, users) Adds users to group name on server. userscan be a list of usernames or a list variable containing multiple usernames.
GroupCreate (server, name, comment) Creates a group with the specified name on server. commentis a string used to provide a description about the group.
GroupDelete (server, name) Deletes a group named name from server.
GroupDeleteUsers (server, name, users) Deletes a list of users from the group name on server.
GroupGetAttributes (server, name, comment) Returns the comment for group name on server to the variable comment.
GroupGetMembers (server, name, $users) Returns the usernames that are members of group name on serverto the array referenced by users.
GroupIsMember (server, name, user) Queries group name on server to see if user is a member. Returns true if user is a member, false if not.
GroupSetAttributes (server, name, comment) Sets the comment for group name on server to the string provided in comment.
LocalGroupAddUsers (server, name, users) Adds users to local group name on server. userscan be a list of usernames or a list variable containing multiple usernames.
LocalGroupCreate (server, name, comment) Creates a local group with the specified name on server. comment is a string used to provide a description about the group.
LocalGroupDelete (server, name) Deletes a local group named name from server.
LocalGroupDeleteUsers (server, name, users) Deletes a list of users from the local group name on server.
LocalGroupGetAttributes (server, name, $comment) Returns the comment for local group nameon server to the variable $comment.
LocalGroupGetMembers (server, name, \@users) Returns the usernames that are members of local group name on serverto the array referenced by users.
LocalGroupIsMember (server, name, user) Queries local group name on server to see if user is a member. Returns true if user is a member, false if not.
LocalGroupSetAttributes (server, name, comment) Sets the comment for local group name on server to the string provided in comment.
Creates a new user with the specified settings:
UserDelete (server, username) Deletes a user with username from server.
UserGetAttributes (server, username, $password, $passwordage, $privilege, $homedir, $comment, $flags, $scriptpath) Retrieves information from a user profile for the user identified by username on server and stores each piece in the corresponding variables you provide as arguments. The elements and order of user information are the same as described in the UserCreate function.
UserSetAttributes (server, username, password, passwordage, privilege, homedir, comment, flags, scriptpath) Sets attributes for user username on server. The attributes are those described for the UserCreate function. Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|