-
Notifications
You must be signed in to change notification settings - Fork 2
/
Net.html
1591 lines (1574 loc) · 68 KB
/
Net.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<HTML>
<HEAD>
<TITLE>Win32API::Net - Perl interface to the Windows NT LanManager API account management functions.</TITLE>
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#note on versions prior to 0.08">NOTE ON VERSIONS PRIOR TO 0.08</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<UL>
<LI><A HREF="#using references">Using References</A></LI>
</UL>
<LI><A HREF="#data structures">DATA STRUCTURES</A></LI>
<LI><A HREF="#exports">EXPORTS</A></LI>
<LI><A HREF="#net user functions">NET USER FUNCTIONS</A></LI>
<UL>
<LI><A HREF="#useradd(server, level, hash, error)">UserAdd(server, level, hash, error)</A></LI>
<LI><A HREF="#userchangepassword(server, user, old, new)">UserChangePassword(server, user, old, new)</A></LI>
<LI><A HREF="#userdel(server, user)">UserDel(server, user)</A></LI>
<LI><A HREF="#userenum(server, array[, filter])">UserEnum(server, array[, filter])</A></LI>
<LI><A HREF="#usergetgroups(server, user, array)">UserGetGroups(server, user, array)</A></LI>
<LI><A HREF="#usergetinfo(server, user, level, hash)">UserGetInfo(server, user, level, hash)</A></LI>
<LI><A HREF="#usergetlocalgroups(server, user, array[, flags])">UserGetLocalGroups(server, user, array[, flags])</A></LI>
<LI><A HREF="#usermodalsget()"><CODE>UserModalsGet()</CODE></A></LI>
<LI><A HREF="#usermodalsset()"><CODE>UserModalsSet()</CODE></A></LI>
<LI><A HREF="#usersetgroups(server, user, array)">UserSetGroups(server, user, array)</A></LI>
<LI><A HREF="#usersetinfo(server, user, level, hash, error)">UserSetInfo(server, user, level, hash, error)</A></LI>
</UL>
<LI><A HREF="#net group functions">NET GROUP FUNCTIONS</A></LI>
<UL>
<LI><A HREF="#groupadd(server, level, hash, error)">GroupAdd(server, level, hash, error)</A></LI>
<LI><A HREF="#groupadduser(server, group, user)">GroupAddUser(server, group, user)</A></LI>
<LI><A HREF="#groupdel(server, group)">GroupDel(server, group)</A></LI>
<LI><A HREF="#groupdeluser(server, group, user)">GroupDelUser(server, group, user)</A></LI>
<LI><A HREF="#groupenum(server, array)">GroupEnum(server, array)</A></LI>
<LI><A HREF="#groupgetinfo(server, group, level, hash)">GroupGetInfo(server, group, level, hash)</A></LI>
<LI><A HREF="#groupgetusers(server, group, array)">GroupGetUsers(server, group, array)</A></LI>
<LI><A HREF="#groupsetinfo(server, group, level, hash, error)">GroupSetInfo(server, group, level, hash, error)</A></LI>
<LI><A HREF="#groupsetusers(server, group, array)">GroupSetUsers(server, group, array)</A></LI>
</UL>
<LI><A HREF="#net local group functions">NET LOCAL GROUP FUNCTIONS</A></LI>
<UL>
<LI><A HREF="#localgroupadd(server, level, hash, error)">LocalGroupAdd(server, level, hash, error)</A></LI>
<LI><A HREF="#localgroupaddmember()"><CODE>LocalGroupAddMember()</CODE></A></LI>
<LI><A HREF="#localgroupaddmembers(server, group, array)">LocalGroupAddMembers(server, group, array)</A></LI>
<LI><A HREF="#localgroupdel(server, group)">LocalGroupDel(server, group)</A></LI>
<LI><A HREF="#localgroupdelmember()"><CODE>LocalGroupDelMember()</CODE></A></LI>
<LI><A HREF="#localgroupdelmembers(server, group, array)">LocalGroupDelMembers(server, group, array)</A></LI>
<LI><A HREF="#localgroupenum(server, array)">LocalGroupEnum(server, array)</A></LI>
<LI><A HREF="#localgroupgetinfo(server, group, level, hash)">LocalGroupGetInfo(server, group, level, hash)</A></LI>
<LI><A HREF="#localgroupgetmembers(server, group, hash)">LocalGroupGetMembers(server, group, hash)</A></LI>
<LI><A HREF="#localgroupsetinfo(server, level, hash, error)">LocalGroupSetInfo(server, level, hash, error)</A></LI>
<LI><A HREF="#localgroupsetmembers()"><CODE>LocalGroupSetMembers()</CODE></A></LI>
</UL>
<LI><A HREF="#net get functions">NET GET FUNCTIONS</A></LI>
<UL>
<LI><A HREF="#getdcname(server, domain, domaincontroller)">GetDCName(server, domain, domain-controller)</A></LI>
</UL>
<LI><A HREF="#user info levels">USER INFO LEVELS</A></LI>
<LI><A HREF="#user info fields">USER INFO FIELDS</A></LI>
<LI><A HREF="#user flags">USER FLAGS</A></LI>
<LI><A HREF="#user privilege flags">USER PRIVILEGE FLAGS</A></LI>
<LI><A HREF="#user enum filter">USER ENUM FILTER</A></LI>
<LI><A HREF="#user field errors">USER FIELD ERRORS</A></LI>
<LI><A HREF="#group info levels">GROUP INFO LEVELS</A></LI>
<LI><A HREF="#group info fields">GROUP INFO FIELDS</A></LI>
<LI><A HREF="#group field errors">GROUP FIELD ERRORS</A></LI>
<LI><A HREF="#group users info levels">GROUP USERS INFO LEVELS</A></LI>
<LI><A HREF="#group users info fields">GROUP USERS INFO FIELDS</A></LI>
<LI><A HREF="#local group info levels">LOCAL GROUP INFO LEVELS</A></LI>
<LI><A HREF="#local group info fields">LOCAL GROUP INFO FIELDS</A></LI>
<LI><A HREF="#local group field errors">LOCAL GROUP FIELD ERRORS</A></LI>
<LI><A HREF="#examples">EXAMPLES</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
<LI><A HREF="#see also">SEE ALSO</A></LI>
<LI><A HREF="#acknowedgements">ACKNOWEDGEMENTS</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>Win32API::Net - Perl interface to the Windows NT LanManager API account management functions.</P>
<P>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<P>use Win32API::Net;</P>
<P>
<HR>
<H1><A NAME="note on versions prior to 0.08">NOTE ON VERSIONS PRIOR TO 0.08</A></H1>
<P>As of version 0.08 of this module, the behaviour relating to empty strings
in input hashes has changed. The old behaviour converted such strings to
the NULL pointer. The underlying API uses this value as an indication to
not change the value stored for a given field. This meant that you were not
able to clear (say) the logonScript field for a user using UserSetInfo().</P>
<P>The new behaviour is to leave the string as an empty C string which will
allow fields to be cleared. To pass a NULL pointer to the underlying
API call (and thus, to leave the field as it was), you need to set the
corresponding field to <CODE>undef</CODE>.</P>
<P>WARNING: <STRONG>THIS IS AN INCOMPATIBLE CHANGE</STRONG>.
<STRONG>EXISTING SCRIPTS THAT RELIED ON PRIOR BEHAVIOR MAY NEED TO BE MODIFIED</STRONG>.</P>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>Win32API::Net provides a more complete wrapper for the account management
parts of the NT LanManager API than do other similar packages. Most of what
you can achieve with the native C++ API is possible with this package - albeit
in a more Perl like manner by using references to pass information to and
from functions.</P>
<P>For an understanding of the environment in which these functions operate see
<A HREF="#data structures">DATA STRUCTURES</A>.</P>
<P>The following groups of functions are available:</P>
<DL>
<DT><STRONG><A NAME="item_NET_USER_FUNCTIONS"><A HREF="#net user functions">NET USER FUNCTIONS</A></A></STRONG><BR>
<DD>
<DT><STRONG><A NAME="item_NET_GROUP_FUNCTIONS"><A HREF="#net group functions">NET GROUP FUNCTIONS</A></A></STRONG><BR>
<DD>
<DT><STRONG><A NAME="item_NET_LOCAL_GROUP_FUNCTIONS"><A HREF="#net local group functions">NET LOCAL GROUP FUNCTIONS</A></A></STRONG><BR>
<DD>
<DT><STRONG><A NAME="item_NET_GET_FUNCTIONS"><A HREF="#net get functions">NET GET FUNCTIONS</A></A></STRONG><BR>
<DD>
</DL>
<P>All functions return 0 on failure and 1 on success. Use the
<CODE>Win32::GetLastError()</CODE> function to find out more information on why a
function failed. In addition, some functions that take a hash reference
to pass information in (e.g. <CODE>UserAdd()</CODE>) have a last argument that will
allow more detailed information on which key/value pair was not properly
specified.</P>
<P>
<H2><A NAME="using references">Using References</A></H2>
<P>References to hashes and arrays are used throughout this package to pass
information into and out of functions.</P>
<DL>
<DT><STRONG><A NAME="item_Using_Hash_References">Using Hash References</A></STRONG><BR>
<DD>
Where a hash reference is required you can use anything that evaluates to a
hash reference. e.g.
<PRE>
$href = \%someHash;
UserAdd(server, 2, $hRef);</PRE>
<P>Or more directly:</P>
<PRE>
UserAdd(server, 2, \%someHash);</PRE>
<P></P>
<DT><STRONG><A NAME="item_Using_Array_references">Using Array references</A></STRONG><BR>
<DD>
Array references are used in a similar manner to hash references. e.g.
<PRE>
$aref = \@someArray;
UserEnum(server, $aref);</PRE>
<P>Or more directly:</P>
<PRE>
UserEnum(server, \@someArray);</PRE>
<P></P></DL>
<P>Please note: Any <CODE>*Get*()</CODE> or <CODE>*Enum()</CODE> operation will first clear the
contents of the input hash or array being referenced.</P>
<P>See <EM>EXAMPLES</EM> and the test.pl script for examples of usage.</P>
<P>
<HR>
<H1><A NAME="data structures">DATA STRUCTURES</A></H1>
<P>Most the the functions in the underlying API allow the programmer to pass
specify at runtime the amount of information that is supplied to the
function. For example, the <CODE>NetUserGetInfo()</CODE> call allows the programmer to
specify levels of 0, 1, 2, 3 (and others). Having specified this level, the
function returns a structure that will contain different fields. For a
level <CODE>0</CODE>, the function returns a structure that has only one field. For a
supplied level of 1, the function returns a structure with <CODE>8</CODE> fields. The
programmer needs to know in advance what fields should be provided or will
be returned for a given level. This mechanism works very will since it
effectively overloads functions without having to use different function
prototypes. Perl provides better higher level data structures in the form
of arrays and hashes. This package uses hashes as the means to pass these
variable size structure into and out of functions.</P>
<P>For any function that takes a reference to a hash as input, the programmer
is expected to provide appropriate keys and corresponding values as well as
the level parameter. The called function will then takes the values out of
the supplied hash and build the approprite structure to pass to the
underlying API function.</P>
<P>For any function that takes a reference to a hash to recieve output, the
function will first clear any keys an corresponding values in the supplied
hash. It will call the underlying API call and will then return in the hash
any keys and values that are applicable at the requested level.</P>
<P>Example:</P>
<P>The <CODE>UserGetInfo()</CODE> can takes a number of levels. If called with level <CODE>0</CODE>
the supplied hash will, on return from the function, contain a single key
and value - namely <STRONG>name</STRONG>/<STRONG>requested-users-name</STRONG>. If called with a level
of <CODE>1</CODE> the supplied hash will, on return from the function, contain 8 keys
and values. The returned keys are <CODE>name, password</CODE>, <CODE>passwordAge</CODE>,
<CODE>priv</CODE>, <CODE>homeDir</CODE>, <CODE>comment</CODE>, <CODE>flags</CODE>, <CODE>scriptPath</CODE>. See
<A HREF="#user info fields">USER INFO FIELDS</A> for more information on what these represent.</P>
<P>
<HR>
<H1><A NAME="exports">EXPORTS</A></H1>
<P>By default, Win32API::Net exports no symbols into the callers namespace.
The following tags can be used to selectively import symbols into the
main namespace.</P>
<DL>
<DT><STRONG><A NAME="item_%3AUser"><CODE>:User</CODE></A></STRONG><BR>
<DD>
Exports all symbols needed for the <CODE>User*()</CODE> functions.
See <A HREF="#net user functions">NET USER FUNCTIONS</A>.
<P></P>
<DT><STRONG><A NAME="item_%3AGet"><CODE>:Get</CODE></A></STRONG><BR>
<DD>
Exports all symbols needed for the <CODE>Get*()</CODE> functions.
See <A HREF="#net get functions">NET GET FUNCTIONS</A>.
<P></P>
<DT><STRONG><A NAME="item_%3AGroup"><CODE>:Group</CODE></A></STRONG><BR>
<DD>
Exports all symbols needed for the <CODE>Group*()</CODE> functions.
See <A HREF="#net group functions">NET GROUP FUNCTIONS</A>.
<P></P>
<DT><STRONG><A NAME="item_%3ALocalGroup"><CODE>:LocalGroup</CODE></A></STRONG><BR>
<DD>
Exports all symbols needed for the <CODE>LocalGroup*()</CODE> functions.
See <A HREF="#net local group functions">NET LOCAL GROUP FUNCTIONS</A>.
<P></P></DL>
<P>
<HR>
<H1><A NAME="net user functions">NET USER FUNCTIONS</A></H1>
<P>The <CODE>User*()</CODE> functions operate on NT user accounts.</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. Administrator privileges are
required to add an Administrator Privilege account. There are some
exceptions to this whereby a user can change some of their own settings
where these don't conflict with 'administrative information' (e.g. full
name).</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>All functions in this section are 'DOMAIN functions'. This means that,
for example, the <CODE>UserGetLocalGroups()</CODE> function actually lists the
domain's local groups of which the named user is a member.</P>
<P>The following functions are available.</P>
<P>
<H2><A NAME="useradd(server, level, hash, error)">UserAdd(server, level, hash, error)</A></H2>
<P>Add a new user account. The user name is taken from the <CODE>name</CODE>-key's
value in the supplied hash.</P>
<DL>
<DT><STRONG><A NAME="item_server_%2D_Scalar_String"><CODE>server</CODE> - Scalar String</A></STRONG><BR>
<DD>
The server on which to add the account.
<P></P>
<DT><STRONG><A NAME="item_level_%2D_Scalar_Int"><CODE>level</CODE> - Scalar Int</A></STRONG><BR>
<DD>
Level of information provided in hash. This can be either 1, 2 or 3.
See <A HREF="#user info levels">USER INFO LEVELS</A>.
<P></P>
<DT><STRONG><A NAME="item_hash_%2D_Hash_Reference"><CODE>hash</CODE> - Hash Reference</A></STRONG><BR>
<DD>
The information to use to add this account. This should have all the
appropriate keys and values required for <CODE>level</CODE>.
<P></P>
<DT><STRONG><A NAME="item_error_%2D_Scalar_Int"><CODE>error</CODE> - Scalar Int</A></STRONG><BR>
<DD>
Provides information on which field in the hash was not properly specified.
See <A HREF="#user field errors">USER FIELD ERRORS</A> for more information about what values this can
take.
<P></P></DL>
<P>
<H2><A NAME="userchangepassword(server, user, old, new)">UserChangePassword(server, user, old, new)</A></H2>
<P>Changes the password for <CODE>user</CODE>. If the policy of the machine/domain
only allows password changes if the <CODE>user</CODE> is logged on then the <CODE>user</CODE>
must be logged on to execute this function. With Administrator or Account
Operator privilege you can use this function to change anyone's password,
so long as you know the old password.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> on which to change the password.
<P></P>
<DT><STRONG><A NAME="item_user_%2D_Scalar_String"><CODE>user</CODE> - Scalar String</A></STRONG><BR>
<DD>
The name of the <CODE>user</CODE> whose password is being changed.
<P></P>
<DT><STRONG><A NAME="item_old_%2D_Scalar_String"><CODE>old</CODE> - Scalar String</A></STRONG><BR>
<DD>
The existing password for <CODE>user</CODE>.
<P></P>
<DT><STRONG><A NAME="item_new_%2D_Scalar_String"><CODE>new</CODE> - Scalar String</A></STRONG><BR>
<DD>
The new password for <CODE>user</CODE>.
<P></P></DL>
<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><BR>
<DD>
The <CODE>server</CODE> on which to delete the <CODE>user</CODE>.
<P></P>
<DT><STRONG><CODE>user</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>user</CODE> account to delete.
<P></P></DL>
<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><BR>
<DD>
The <CODE>server</CODE> on which to enumerate the accounts satisfying <CODE>filter</CODE>.
<P></P>
<DT><STRONG><A NAME="item_array_%2D_Array_Reference"><CODE>array</CODE> - Array Reference</A></STRONG><BR>
<DD>
The array that will hold the names of all users on <CODE>server</CODE> whose
accounts match <CODE>filter</CODE>.
<P></P>
<DT><STRONG><A NAME="item_Int"><CODE>filter</CODE> - Scalar Int (optional)</A></STRONG><BR>
<DD>
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></P></DL>
<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><BR>
<DD>
The <CODE>server</CODE> from which to get the groups of which <CODE>user</CODE> is a member.
<P></P>
<DT><STRONG><CODE>user</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>user</CODE> whose group membership you wish to examine.
<P></P>
<DT><STRONG><A NAME="item_array_%2D_Scalar_String"><CODE>array</CODE> - Scalar String</A></STRONG><BR>
<DD>
The array that will contain the group names to which <CODE>user</CODE> belongs.
<P></P></DL>
<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><BR>
<DD>
The <CODE>server</CODE> from which to get the requested information about <CODE>user</CODE>.
<P></P>
<DT><STRONG><CODE>user</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>user</CODE> whose information you want.
<P></P>
<DT><STRONG><CODE>level</CODE> - Scalar Int</STRONG><BR>
<DD>
One of: 0, 1, 2, 3, 10, 11 and 20. See <A HREF="#user info levels">USER INFO LEVELS</A>.
<P></P>
<DT><STRONG><CODE>hash</CODE> - Hash Reference</STRONG><BR>
<DD>
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></P></DL>
<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><BR>
<DD>
The server from which to get the local groups of which <CODE>user</CODE> is a member.
<P></P>
<DT><STRONG><CODE>user</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>user</CODE> whose local group membership you wish to enumerate.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
The array that will hold the names of the local groups to which <CODE>user</CODE>
belongs.
<P></P>
<DT><STRONG><A NAME="item_flags_%2D_Scalar_Int_%3Cem%3E%28optional%29%3C%2Fe"><CODE>flags</CODE> - Scalar Int <em>(optional)</em></A></STRONG><BR>
<DD>
Either <CODE>Win32API::Net::LG_INCLUDE_INDIRECT()</CODE> or 0. if <CODE>flags</CODE> 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>This field can take no other values.</P>
<P></P></DL>
<P>
<H2><A NAME="usermodalsget()"><CODE>UserModalsGet()</CODE></A></H2>
<P>This function is not currently implemented.</P>
<P>
<H2><A NAME="usermodalsset()"><CODE>UserModalsSet()</CODE></A></H2>
<P>This function is not currently implemented.</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><BR>
<DD>
The <CODE>server</CODE> on which you wish to set the group membership for <CODE>user</CODE>.
<P></P>
<DT><STRONG><CODE>user</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>user</CODE> whose group membership you wish to set.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
The array containing the (global) group names to set the <CODE>user</CODE>s
membership of.
<P></P></DL>
<P>This function will fail if any of the group names specified do not exist.</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><BR>
<DD>
The <CODE>server</CODE> on which you wish to change the info for <CODE>user</CODE>.
<P></P>
<DT><STRONG><CODE>user</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>user</CODE> whose info you wish to change.
<P></P>
<DT><STRONG><CODE>level</CODE> - Scalar Int</STRONG><BR>
<DD>
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></P>
<DT><STRONG><CODE>hash</CODE> - Hash Reference</STRONG><BR>
<DD>
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></P>
<DT><STRONG><CODE>error</CODE> - Scalar Int</STRONG><BR>
<DD>
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></P></DL>
<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>
<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><BR>
<DD>
The <CODE>server</CODE> on which to add the group.
<P></P>
<DT><STRONG><A NAME="item_level_%2D_Scalar_String"><CODE>level</CODE> - Scalar String</A></STRONG><BR>
<DD>
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></P>
<DT><STRONG><CODE>hash</CODE> - Hash Reference</STRONG><BR>
<DD>
A hash containing the required key/value pairs for <CODE>level</CODE>.
<P></P>
<DT><STRONG><CODE>error</CODE> - Scalar Int</STRONG><BR>
<DD>
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></P></DL>
<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><BR>
<DD>
The <CODE>server</CODE> on which to add the <CODE>user</CODE> to <CODE>group</CODE>.
<P></P>
<DT><STRONG><A NAME="item_group_%2D_Scalar_String"><CODE>group</CODE> - Scalar String</A></STRONG><BR>
<DD>
The <CODE>group</CODE> to add the <CODE>user</CODE> to.
<P></P>
<DT><STRONG><CODE>user</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>user</CODE> to add to <CODE>group</CODE>.
<P></P></DL>
<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><BR>
<DD>
The <CODE>server</CODE> on which to delete the named <CODE>group</CODE>.
<P></P>
<DT><STRONG><A NAME="item_group_%2DScalar_String"><CODE>group</CODE> -Scalar String</A></STRONG><BR>
<DD>
The <CODE>group</CODE> to delete.
<P></P></DL>
<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><BR>
<DD>
The <CODE>server</CODE> on which to delete <CODE>user</CODE> from <CODE>group</CODE>.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> from which to delete <CODE>user</CODE>.
<P></P>
<DT><STRONG><CODE>user</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>user</CODE> to delete from <CODE>group</CODE>.
<P></P></DL>
<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
<CODE>NetGroupEnum()</CODE>, 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).</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The server on which to enumerate the (global) <CODE>groups</CODE>.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
An array that, on return, will contain the <CODE>group</CODE> names.
<P></P></DL>
<P>
<H2><A NAME="groupgetinfo(server, group, level, hash)">GroupGetInfo(server, group, level, hash)</A></H2>
<P>Retrieves <CODE>level</CODE> information for <CODE>group</CODE> returning information in
<CODE>hash</CODE>.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> from which to get the group information.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> whose information you wish to obtain.
<P></P>
<DT><STRONG><CODE>level</CODE> - Scalar Int</STRONG><BR>
<DD>
The <CODE>level</CODE> of information you wish to retrieve. This can be one of 1, 2
or 3. See <A HREF="#group info levels">GROUP INFO LEVELS</A>.
<P></P>
<DT><STRONG><CODE>hash</CODE> - Hash Reference</STRONG><BR>
<DD>
The hash that will contain the information.
<P></P></DL>
<P>
<H2><A NAME="groupgetusers(server, group, array)">GroupGetUsers(server, group, array)</A></H2>
<P>Returns (in <CODE>array</CODE>) the users belonging to <CODE>group</CODE>. Unlike the API
call <CODE>NetGroupGetUsers()</CODE>, 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).</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> from which to get the group information.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> whose users you wish to obtain.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
The array to hold the user names retrieved.
<P></P></DL>
<P>
<H2><A NAME="groupsetinfo(server, group, level, hash, error)">GroupSetInfo(server, group, level, hash, error)</A></H2>
<P>Sets the information for <CODE>group</CODE> according to <CODE>level</CODE>.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> on which to set the <CODE>group</CODE> information.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> whose information you wish to set.
<P></P>
<DT><STRONG><CODE>level</CODE> - Scalar Int</STRONG><BR>
<DD>
The <CODE>level</CODE> of information you are supplying in <CODE>hash</CODE>. Level can be
one of 0, 1 or 2. See <A HREF="#group info levels">GROUP INFO LEVELS</A>.
<P></P>
<DT><STRONG><CODE>hash</CODE> - Hash Reference</STRONG><BR>
<DD>
The hash containing the required key/value pairs for <CODE>level</CODE>.
<P></P>
<DT><STRONG><A NAME="item_error_%2D_Scalar_String"><CODE>error</CODE> - Scalar String</A></STRONG><BR>
<DD>
On failure, the <CODE>error</CODE> parameter will contain a value which specifies
which field caused the error. See <A HREF="#group field errors">GROUP FIELD ERRORS</A>.
<P></P></DL>
<P>
<H2><A NAME="groupsetusers(server, group, array)">GroupSetUsers(server, group, array)</A></H2>
<P>Sets the membership of <CODE>group</CODE> to contain only those users specified
in <CODE>array</CODE>. This function will fail if any user names contained in the
array are not valid users on <CODE>server</CODE>. On successful completion
<CODE>group</CODE> will contain only the users specified in <CODE>array</CODE>. Use the
functions <CODE>GroupAddUser()/GroupDelUser()</CODE> to add and delete individual
users from a group.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> on which to set the <CODE>group</CODE> membership.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> to set the membership of.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
The array containing the names of all users who will be members of <CODE>group</CODE>.
<P></P></DL>
<P>
<HR>
<H1><A NAME="net local group functions">NET LOCAL GROUP FUNCTIONS</A></H1>
<P>The <CODE>LocalGroup*()</CODE> functions operate on local groups. If these
functions are run on a PDC then these functions operate on the domains
local groups.</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>
<H2><A NAME="localgroupadd(server, level, hash, error)">LocalGroupAdd(server, level, hash, error)</A></H2>
<P>Adds the specified group. The name of the group is contained in the <CODE>name</CODE>
key of <CODE>hash</CODE>.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> on which to add the group.
<P></P>
<DT><STRONG><CODE>level</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>level</CODE> of information contained in <CODE>hash</CODE>. This can be one of 0 or 1.
See <A HREF="#local group info levels">LOCAL GROUP INFO LEVELS</A>.
<P></P>
<DT><STRONG><CODE>hash</CODE> - Hash Reference</STRONG><BR>
<DD>
A hash containing the required key/value pairs for <CODE>level</CODE>.
<P></P>
<DT><STRONG><CODE>error</CODE> - Scalar Int</STRONG><BR>
<DD>
Provides information on which field in <CODE>hash</CODE> wasn't properly specified.
See <A HREF="#local group field errors">LOCAL GROUP FIELD ERRORS</A> for more information about what values
this can take.
<P></P></DL>
<P>
<H2><A NAME="localgroupaddmember()"><CODE>LocalGroupAddMember()</CODE></A></H2>
<P>This function is obselete in the underlying API and has therefore not
been implemented. Use <CODE>LocalGroupAddMembers</CODE> instead.</P>
<P>
<H2><A NAME="localgroupaddmembers(server, group, array)">LocalGroupAddMembers(server, group, array)</A></H2>
<P>Adds the specified users (members) to the local group. Unlike the API
function <CODE>NetLocalGroupAddMembers()</CODE>, this function does not allow you
to specify a level (internally it is hardcoded to 3).
This was done to simplify the implementation. To add a 'local' user, you
need only specify the <CODE>name</CODE>. You can also specify users using the
<CODE>DOMAIN\user</CODE> syntax.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> on which to add the members to <CODE>group</CODE>.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> to add the members to.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
The array containing the members to add to <CODE>group</CODE>.
<P></P></DL>
<P>
<H2><A NAME="localgroupdel(server, group)">LocalGroupDel(server, group)</A></H2>
<P>Delete the specified local group.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> on which to delete the named <CODE>group</CODE>.
<P></P>
<DT><STRONG><CODE>group</CODE> -Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> to delete.
<P></P></DL>
<P>
<H2><A NAME="localgroupdelmember()"><CODE>LocalGroupDelMember()</CODE></A></H2>
<P>This function is obselete in the underlying API and has therefore not
been implemented. Use <CODE>LocalGroupDelMembers()</CODE> instead.</P>
<P>
<H2><A NAME="localgroupdelmembers(server, group, array)">LocalGroupDelMembers(server, group, array)</A></H2>
<P>Delete the specified users (members) of the local group. Unlike the API
function <CODE>NetLocalGroupDelMembers()</CODE>, this function does not allow you
to specify a level (internally it is hardcoded to 3). This was done to
simplify the implementation. To delete a 'local' user, you need only
specify the <CODE>name</CODE>. You can also specify users using the <CODE>DOMAIN\user</CODE>
syntax.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> on which to delete the members from <CODE>group</CODE>.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> to delete the members from.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
The array containing the members to delete from <CODE>group</CODE>.
<P></P></DL>
<P>
<H2><A NAME="localgroupenum(server, array)">LocalGroupEnum(server, array)</A></H2>
<P>Enumerates all the local groups on the server. Unlike the API call
<CODE>NetLocalGroupEnum()</CODE>, 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).</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The server on which to enumerate the (local) <CODE>groups</CODE>.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
The array to hold the <CODE>group</CODE> names.
<P></P></DL>
<P>
<H2><A NAME="localgroupgetinfo(server, group, level, hash)">LocalGroupGetInfo(server, group, level, hash)</A></H2>
<P>Retrieves <CODE>level</CODE> information for <CODE>group</CODE>.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> from which to get the group information.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> whose information you wish to obtain.
<P></P>
<DT><STRONG><CODE>level</CODE> - Scalar Int</STRONG><BR>
<DD>
The <CODE>level</CODE> of information you wish to retrieve. This can be 0 or 1.
See <A HREF="#local group info levels">LOCAL GROUP INFO LEVELS</A>.
<P></P>
<DT><STRONG><CODE>hash</CODE> - Hash Reference</STRONG><BR>
<DD>
The hash that will contain the information.
<P></P></DL>
<P>
<H2><A NAME="localgroupgetmembers(server, group, hash)">LocalGroupGetMembers(server, group, hash)</A></H2>
<P>Retrieves the users belonging to <CODE>group</CODE>. Unlike the API call
<CODE>NetLocalGroupGetUsers()</CODE>, 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).</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> from which to retrieve the group information.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> whose users you wish to obtain.
<P></P>
<DT><STRONG><CODE>array</CODE> - Array Reference</STRONG><BR>
<DD>
The array to hold the user names retrieved.
<P></P></DL>
<P>
<H2><A NAME="localgroupsetinfo(server, level, hash, error)">LocalGroupSetInfo(server, level, hash, error)</A></H2>
<P>Sets the information for <CODE>group</CODE> according to <CODE>level</CODE>.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> on which to set the <CODE>group</CODE> information.
<P></P>
<DT><STRONG><CODE>group</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>group</CODE> whose information you wish to set.
<P></P>
<DT><STRONG><CODE>level</CODE> - Scalar Int</STRONG><BR>
<DD>
The <CODE>level</CODE> of information you are supplying in <CODE>hash</CODE>.
Level can be one of 0 or 1. See <A HREF="#local group info levels">LOCAL GROUP INFO LEVELS</A>.
<P></P>
<DT><STRONG><CODE>hash</CODE> - Hash Reference</STRONG><BR>
<DD>
The hash containing the required key/value pairs for <CODE>level</CODE>.
<P></P>
<DT><STRONG><CODE>error</CODE> - Scalar String</STRONG><BR>
<DD>
On failure, the <CODE>error</CODE> parameter will contain a value which specifies
which field caused the error. See <A HREF="#local group field errors">LOCAL GROUP FIELD ERRORS</A>.
<P></P></DL>
<P>
<H2><A NAME="localgroupsetmembers()"><CODE>LocalGroupSetMembers()</CODE></A></H2>
<P>This function has not been implemented at present.</P>
<P>
<HR>
<H1><A NAME="net get functions">NET GET FUNCTIONS</A></H1>
<P>
<H2><A NAME="getdcname(server, domain, domaincontroller)">GetDCName(server, domain, domain-controller)</A></H2>
<P>Gets the <CODE>domain-controller</CODE> name for <CODE>server</CODE> and <CODE>domain</CODE>.</P>
<DL>
<DT><STRONG><CODE>server</CODE> - Scalar String</STRONG><BR>
<DD>
The <CODE>server</CODE> whose domain controller you wish to locate.
<P></P>
<DT><STRONG><A NAME="item_domain_%2D_Scalar_String"><CODE>domain</CODE> - Scalar String</A></STRONG><BR>
<DD>
The <CODE>domain</CODE> that <CODE>server</CODE> is a member of whose domain-controller
you wish the locate.
<P></P>
<DT><STRONG><A NAME="item_String"><CODE>domain-controller</CODE> - Scalar String (output)</A></STRONG><BR>
<DD>
The name of the <CODE>domain-controller</CODE> for the requested <CODE>domain</CODE>.
<P></P></DL>
<P>Note: This module does not implement the <CODE>NetGetAnyDCName()</CODE>API function
as this is obsolete.</P>
<P>
<HR>
<H1><A NAME="user info levels">USER INFO LEVELS</A></H1>
<P>Most of the <CODE>User*()</CODE> functions take a <CODE>level</CODE> parameter. This <CODE>level</CODE>
specifies how much detail the corresponding <CODE>hash</CODE> should contain (or in
the case of a <CODE>UserGet*()</CODE> function, will contain after the call). The
following <CODE>level</CODE> descriptions provide information on what fields should
be present for a given level. See <A HREF="#user info fields">USER INFO FIELDS</A> for a description of
the fields.</P>
<DL>
<DT><STRONG><A NAME="item_Level_0">Level 0</A></STRONG><BR>
<DD>
name
<P></P>
<DT><STRONG><A NAME="item_Level_1">Level 1</A></STRONG><BR>
<DD>
name, password, passwordAge, priv, homeDir, comment, flags, scriptPath
<P></P>
<DT><STRONG><A NAME="item_Level_2">Level 2</A></STRONG><BR>
<DD>
name, password, passwordAge, priv, homeDir, comment, flags, scriptPath,
authFlags, fullName, usrComment, parms, workstations, lastLogon,
lastLogoff, acctExpires, maxStorage, unitsPerWeek, logonHours, badPwCount,
numLogons, logonServer, countryCode, codePage
<P></P>
<DT><STRONG><A NAME="item_Level_3">Level 3</A></STRONG><BR>
<DD>
name, password, passwordAge, priv, homeDir, comment, flags, scriptPath,
authFlags, fullName, usrComment, parms, workstations, lastLogon, lastLogoff,
acctExpires, maxStorage, unitsPerWeek, logonHours, badPwCount, numLogons,
logonServer, countryCode, codePage, userId, primaryGroupId, profile,
homeDirDrive, passwordExpired
<P></P>
<DT><STRONG><A NAME="item_Level_10">Level 10</A></STRONG><BR>
<DD>
name, comment, usrComment, fullName
<P></P>
<DT><STRONG><A NAME="item_Level_11">Level 11</A></STRONG><BR>
<DD>
name, comment, usrComment, fullName, priv, authFlags, passwordAge, homeDir,
parms, lastLogon, lastLogoff, badPwCount, numLogons, logonServer,
countryCode, workstations, maxStorage, unitsPerWeek, logonHours, codePage
<P></P>
<DT><STRONG><A NAME="item_Level_20">Level 20</A></STRONG><BR>
<DD>
name, fullName, comment, flags, userId
<P></P>
<DT><STRONG><A NAME="item_Level_21">Level 21</A></STRONG><BR>
<DD>
<STRONG>Not available in this implementation</STRONG>
<P></P>
<DT><STRONG><A NAME="item_Level_22">Level 22</A></STRONG><BR>
<DD>
<STRONG>Not available in this implementation</STRONG>
<P></P>
<DT><STRONG><A NAME="item_Level_1003">Level 1003</A></STRONG><BR>
<DD>
password
<P></P>
<DT><STRONG><A NAME="item_Level_1005">Level 1005</A></STRONG><BR>
<DD>
priv
<P></P>
<DT><STRONG><A NAME="item_Level_1006">Level 1006</A></STRONG><BR>
<DD>
homeDir
<P></P>
<DT><STRONG><A NAME="item_Level_1007">Level 1007</A></STRONG><BR>
<DD>
comment
<P></P>
<DT><STRONG><A NAME="item_Level_1008">Level 1008</A></STRONG><BR>
<DD>
flags
<P></P>
<DT><STRONG><A NAME="item_Level_1009">Level 1009</A></STRONG><BR>
<DD>
scriptPath
<P></P>
<DT><STRONG><A NAME="item_Level_1010">Level 1010</A></STRONG><BR>
<DD>
authFlags
<P></P>
<DT><STRONG><A NAME="item_Level_1011">Level 1011</A></STRONG><BR>
<DD>
fullName
<P></P>
<DT><STRONG><A NAME="item_Level_1012">Level 1012</A></STRONG><BR>
<DD>
usrComment
<P></P>
<DT><STRONG><A NAME="item_Level_1013">Level 1013</A></STRONG><BR>
<DD>
parms
<P></P>
<DT><STRONG><A NAME="item_Level_1014">Level 1014</A></STRONG><BR>
<DD>
workstations
<P></P>
<DT><STRONG><A NAME="item_Level_1017">Level 1017</A></STRONG><BR>
<DD>
acctExpires
<P></P>
<DT><STRONG><A NAME="item_Level_1018">Level 1018</A></STRONG><BR>
<DD>
maxStorage
<P></P>
<DT><STRONG><A NAME="item_Level_1020">Level 1020</A></STRONG><BR>
<DD>
unitsPerWeek, logonHours
<P></P>
<DT><STRONG><A NAME="item_Level_1023">Level 1023</A></STRONG><BR>
<DD>
logonServer
<P></P>
<DT><STRONG><A NAME="item_Level_1024">Level 1024</A></STRONG><BR>
<DD>
countryCode
<P></P>
<DT><STRONG><A NAME="item_Level_1025">Level 1025</A></STRONG><BR>
<DD>
codePage
<P></P>
<DT><STRONG><A NAME="item_Level_1051">Level 1051</A></STRONG><BR>
<DD>
primaryGroupId
<P></P>
<DT><STRONG><A NAME="item_Level_1052">Level 1052</A></STRONG><BR>
<DD>
profile
<P></P>
<DT><STRONG><A NAME="item_Level_1053">Level 1053</A></STRONG><BR>
<DD>
homeDirDrive
<P></P></DL>
<P>
<HR>
<H1><A NAME="user info fields">USER INFO FIELDS</A></H1>
<P>The following is an alphabetical listing of each possible field, together
with the data type that the field is expected to contain.</P>
<DL>