@@ -5,7 +5,7 @@ package Win32::NetAdmin;
5
5
# Written by Douglas_Lankshear@ActiveWare.com
6
6
#
7
7
8
- $VERSION = ' 0.02 ' ;
8
+ $VERSION = ' 0.03 ' ;
9
9
10
10
require Exporter;
11
11
require DynaLoader;
@@ -76,122 +76,141 @@ Win32::NetAdmin - manage network groups and users in perl
76
76
77
77
=head1 DESCRIPTION
78
78
79
- This module offers control over the administration of groups and users over a network.
79
+ This module offers control over the administration of groups and users over a
80
+ network.
80
81
81
82
=head1 FUNCTIONS
82
83
83
84
=head2 NOTE
84
85
85
86
All of the functions return FALSE (0) if they fail, unless otherwise noted.
86
- server is optional for all the calls below. (if not given the local machine is assumed.)
87
+ C<server > is optional for all the calls below. If not given the local machine is
88
+ assumed.
87
89
88
90
=over 10
89
91
90
92
=item GetDomainController(server, domain, returnedName)
91
93
92
- Return the name of the domain controller for server
94
+ Returns the name of the domain controller for server.
93
95
94
96
=item GetAnyDomainController(server, domain, returnedName)
95
97
96
- Return the name of any domain controller for a domain that is directly trusted
97
- by the server
98
+ Returns the name of any domain controller for a domain that is directly trusted
99
+ by the server.
98
100
99
101
=item UserCreate(server, userName, password, passwordAge, privilege, homeDir, comment, flags, scriptPath)
100
102
101
- Creates a user on server with password, passwordAge, privilege, homeDir, comment, flags, and scriptPath
103
+ Creates a user on server with password, passwordAge, privilege, homeDir, comment,
104
+ flags, and scriptPath.
102
105
103
106
=item UserDelete(server, user)
104
107
105
- Deletes a user from server
108
+ Deletes a user from server.
106
109
107
110
=item UserGetAttributes(server, userName, password, passwordAge, privilege, homeDir, comment, flags, scriptPath)
108
111
109
- Gets password, passwordAge, privilege, homeDir, comment, flags, and scriptPath for user
112
+ Gets password, passwordAge, privilege, homeDir, comment, flags, and scriptPath
113
+ for user.
110
114
111
115
=item UserSetAttributes(server, userName, password, passwordAge, privilege, homeDir, comment, flags, scriptPath)
112
116
113
- Sets password, passwordAge, privilege, homeDir, comment, flags, and scriptPath for user
117
+ Sets password, passwordAge, privilege, homeDir, comment, flags, and scriptPath
118
+ for user.
114
119
115
120
=item UserChangePassword(domainname, username, oldpassword, newpassword)
116
121
117
122
Changes a users password. Can be run under any account.
118
123
119
124
=item UsersExist(server, userName)
120
125
121
- Checks if a User exists
126
+ Checks if a user exists.
122
127
123
- =item GetUsers(server, filter, \@userArray )
128
+ =item GetUsers(server, filter, userRef )
124
129
125
- Fills userArray with the all of the User names
130
+ Fills userRef with user names if it is an array reference and with the user
131
+ names and the full names if it is a hash reference.
126
132
127
133
=item GroupCreate(server, group, comment)
128
134
129
- Creates a group
135
+ Creates a group.
130
136
131
137
=item GroupDelete(server, group)
132
138
133
- Deletes a group
139
+ Deletes a group.
134
140
135
141
=item GroupGetAttributes(server, groupName, comment)
136
142
137
- Gets the comment
143
+ Gets the comment.
138
144
139
145
=item GroupSetAttributes(server, groupName, comment)
140
146
141
- Sets the comment
147
+ Sets the comment.
142
148
143
149
=item GroupAddUsers(server, groupName, users)
144
150
145
- Adds a user to a group
151
+ Adds a user to a group.
146
152
147
153
=item GroupDeleteUsers(server, groupName, users)
148
154
149
- Deletes a users from a group
155
+ Deletes a users from a group.
150
156
151
157
=item GroupIsMember(server, groupName, user)
152
158
153
- Returns TRUE if user is a member of groupName
159
+ Returns TRUE if user is a member of groupName.
154
160
155
- =item GroupGetMembers(server, groupName, \@userArray )
161
+ =item GroupGetMembers(server, groupName, userArrayRef )
156
162
157
- Fills userArray with the members of groupName
163
+ Fills userArrayRef with the members of groupName.
158
164
159
165
=item LocalGroupCreate(server, group, comment)
160
166
161
- Creates a local group
167
+ Creates a local group.
162
168
163
169
=item LocalGroupDelete(server, group)
164
170
165
- Deletes a local group
171
+ Deletes a local group.
166
172
167
173
=item LocalGroupGetAttributes(server, groupName, comment)
168
174
169
- Gets the comment
175
+ Gets the comment.
170
176
171
177
=item LocalGroupSetAttributes(server, groupName, comment)
172
178
173
- Sets the comment
179
+ Sets the comment.
174
180
175
181
=item LocalGroupIsMember(server, groupName, user)
176
182
177
- Returns TRUE if user is a member of groupName
183
+ Returns TRUE if user is a member of groupName.
178
184
179
- =item LocalGroupGetMembers(server, groupName, \@userArray )
185
+ =item LocalGroupGetMembers(server, groupName, userArrayRef )
180
186
181
- Fills userArray with the members of groupName
187
+ Fills userArrayRef with the members of groupName.
182
188
183
189
=item LocalGroupAddUsers(server, groupName, users)
184
190
185
- Adds a user to a group
191
+ Adds a user to a group.
186
192
187
193
=item LocalGroupDeleteUsers(server, groupName, users)
188
194
189
- Deletes a users from a group
195
+ Deletes a users from a group.
190
196
191
- =item GetServers(server, domain, flags, \@serverArray )
197
+ =item GetServers(server, domain, flags, serverRef )
192
198
193
- Gets an array of server names
194
- flags - see SV_TYPE_... in constants
199
+ Gets an array of server names or an hash with the server names and the
200
+ comments as seen in the Network Neighborhood or the server manager.
201
+ For flags, see SV_TYPE_* constants.
202
+
203
+ =item GetTransports(server, transportRef)
204
+
205
+ Enumerates the network transports of a computer. If transportRef is an array
206
+ reference, it is filled with the transport names. If transportRef is a hash
207
+ reference then a hash of hashes is filled with the data for the transports.
208
+
209
+ =item LoggedOnUsers(server, userRef)
210
+
211
+ Gets an array or hash with the users logged on at the specified computer. If
212
+ userRef is a hash reference, the value is a semikolon separated string of
213
+ username, logon domain and logon server.
195
214
196
215
=back
197
216
0 commit comments