home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeJava and XSLTSearch this book

22.10. Win32::NetAdmin

The 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.

GroupAddUsers

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

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

GroupDelete (server, name)

Deletes a group named name from server.

GroupDeleteUsers

GroupDeleteUsers (server, name, users)

Deletes a list of users from the group name on server.

GroupGetAttributes

GroupGetAttributes (server, name, comment)

Returns the comment for group name on server to the variable comment.

GroupGetMembers

GroupGetMembers (server, name, $users)

Returns the usernames that are members of group name on serverto the array referenced by users.

GroupIsMember

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

GroupSetAttributes (server, name, comment)

Sets the comment for group name on server to the string provided in comment.

LocalGroupAddUsers

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

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

LocalGroupDelete (server, name)

Deletes a local group named name from server.

LocalGroupDeleteUsers

LocalGroupDeleteUsers (server, name, users)

Deletes a list of users from the local group name on server.

LocalGroupGetAttributes

LocalGroupGetAttributes (server, name, $comment)

Returns the comment for local group nameon server to the variable $comment.

LocalGroupIsMember

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

LocalGroupSetAttributes (server, name, comment)

Sets the comment for local group name on server to the string provided in comment.

UserDelete

UserDelete (server, username)

Deletes a user with username from server.

UserGetAttributes

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

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.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.