4 samr interface definition
8 Thanks to Todd Sabin for some information from his samr.idl in acltools
11 [ uuid("12345778-1234-abcd-ef00-0123456789ac"),
13 endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
14 pointer_default(unique),
15 pointer_default_top(unique),
19 /* account control (acct_flags) bits */
20 typedef [public,bitmap32bit] bitmap {
21 ACB_DISABLED = 0x00000001, /* 1 = User account disabled */
22 ACB_HOMDIRREQ = 0x00000002, /* 1 = Home directory required */
23 ACB_PWNOTREQ = 0x00000004, /* 1 = User password not required */
24 ACB_TEMPDUP = 0x00000008, /* 1 = Temporary duplicate account */
25 ACB_NORMAL = 0x00000010, /* 1 = Normal user account */
26 ACB_MNS = 0x00000020, /* 1 = MNS logon user account */
27 ACB_DOMTRUST = 0x00000040, /* 1 = Interdomain trust account */
28 ACB_WSTRUST = 0x00000080, /* 1 = Workstation trust account */
29 ACB_SVRTRUST = 0x00000100, /* 1 = Server trust account */
30 ACB_PWNOEXP = 0x00000200, /* 1 = User password does not expire */
31 ACB_AUTOLOCK = 0x00000400 /* 1 = Account auto locked */
36 NTSTATUS samr_Connect (
37 /* notice the lack of [string] */
38 [in] uint16 *system_name,
39 [in] uint32 access_mask,
40 [out,ref] policy_handle *connect_handle
47 [in,out,ref] policy_handle *handle
53 NTSTATUS samr_SetSecurity (
54 [in,ref] policy_handle *handle,
56 [in,ref] sec_desc_buf *sdbuf
62 NTSTATUS samr_QuerySecurity (
63 [in,ref] policy_handle *handle,
65 [out] sec_desc_buf *sdbuf
72 shutdown the SAM - once you call this the SAM will be dead
74 NTSTATUS samr_Shutdown (
75 [in,ref] policy_handle *connect_handle
81 [value(2*strlen_m(r->string))] uint16 length;
82 [value(r->length)] uint16 size;
83 unistr_noterm *string;
86 NTSTATUS samr_LookupDomain (
87 [in,ref] policy_handle *connect_handle,
88 [in,ref] samr_String *domain_name,
103 [size_is(count)] samr_SamEntry *entries[];
106 NTSTATUS samr_EnumDomains (
107 [in,ref] policy_handle *connect_handle,
108 [in,out,ref] uint32 *resume_handle,
109 [in] uint32 buf_size,
110 [out] samr_SamArray *sam,
111 [out] uint32 num_entries
115 /************************/
117 NTSTATUS samr_OpenDomain(
118 [in,ref] policy_handle *connect_handle,
119 [in] uint32 access_mask,
120 [in,ref] dom_sid2 *sid,
121 [out,ref] policy_handle *domain_handle
124 /************************/
127 typedef [v1_enum] enum {
129 ROLE_DOMAIN_MEMBER = 1,
135 uint16 min_password_length;
136 uint16 password_history_length;
137 uint32 password_properties;
138 /* yes, these are signed. They are in negative 100ns */
139 dlong max_password_age;
140 dlong min_password_age;
144 NTTIME force_logoff_time;
146 samr_String domain_name;
147 samr_String primary; /* PDC name if this is a BDC */
158 NTTIME force_logoff_time;
166 samr_String domain_name;
179 NTTIME domain_create_time;
183 uint32 unknown; /* w2k3 returns 1 */
188 hyper lockout_duration;
189 hyper lockout_window;
190 uint16 lockout_threshold;
194 hyper lockout_duration;
195 hyper lockout_window;
196 uint16 lockout_threshold;
201 NTTIME domain_create_time;
206 typedef [switch_type(uint16)] union {
207 [case(1)] samr_DomInfo1 info1;
208 [case(2)] samr_DomInfo2 info2;
209 [case(3)] samr_DomInfo3 info3;
210 [case(4)] samr_DomInfo4 info4;
211 [case(5)] samr_DomInfo5 info5;
212 [case(6)] samr_DomInfo6 info6;
213 [case(7)] samr_DomInfo7 info7;
214 [case(8)] samr_DomInfo8 info8;
215 [case(9)] samr_DomInfo9 info9;
216 [case(11)] samr_DomInfo11 info11;
217 [case(12)] samr_DomInfo12 info12;
218 [case(13)] samr_DomInfo13 info13;
221 NTSTATUS samr_QueryDomainInfo(
222 [in,ref] policy_handle *domain_handle,
224 [out,switch_is(level)] samr_DomainInfo *info
227 /************************/
230 only levels 1, 3, 4, 6, 7, 9, 12 are valid for this
233 NTSTATUS samr_SetDomainInfo(
234 [in,ref] policy_handle *domain_handle,
236 [in,switch_is(level),ref] samr_DomainInfo *info
240 /************************/
242 NTSTATUS samr_CreateDomainGroup(
243 [in,ref] policy_handle *domain_handle,
244 [in,ref] samr_String *name,
245 [in] uint32 access_mask,
246 [out,ref] policy_handle *group_handle,
247 [out,ref] uint32 *rid
251 /************************/
253 NTSTATUS samr_EnumDomainGroups(
254 [in,ref] policy_handle *domain_handle,
255 [in,out,ref] uint32 *resume_handle,
256 [in] uint32 max_size,
257 [out] samr_SamArray *sam,
258 [out] uint32 num_entries
261 /************************/
263 NTSTATUS samr_CreateUser(
264 [in,ref] policy_handle *domain_handle,
265 [in,ref] samr_String *account_name,
266 [in] uint32 access_mask,
267 [out,ref] policy_handle *user_handle,
268 [out,ref] uint32 *rid
271 /************************/
275 /* w2k3 treats max_size as max_users*54 and sets the
276 resume_handle as the rid of the last user sent
278 const int SAMR_ENUM_USERS_MULTIPLIER = 54;
280 NTSTATUS samr_EnumDomainUsers(
281 [in,ref] policy_handle *domain_handle,
282 [in,out,ref] uint32 *resume_handle,
283 [in] samr_AcctFlags acct_flags,
284 [in] uint32 max_size,
285 [out] samr_SamArray *sam,
286 [out] uint32 num_entries
289 /************************/
291 NTSTATUS samr_CreateDomAlias(
292 [in,ref] policy_handle *domain_handle,
293 [in,ref] samr_String *alias_name,
294 [in] uint32 access_mask,
295 [out,ref] policy_handle *alias_handle,
296 [out,ref] uint32 *rid
299 /************************/
301 NTSTATUS samr_EnumDomainAliases(
302 [in,ref] policy_handle *domain_handle,
303 [in,out,ref] uint32 *resume_handle,
304 [in] samr_AcctFlags acct_flags,
305 [out] samr_SamArray *sam,
306 [out] uint32 num_entries
309 /************************/
313 [range(0,1024)] uint32 count;
314 [size_is(count)] uint32 *ids[];
317 NTSTATUS samr_GetAliasMembership(
318 [in,ref] policy_handle *domain_handle,
319 [in,ref] lsa_SidArray *sids,
320 [out,ref] samr_Ids *rids
323 /************************/
326 NTSTATUS samr_LookupNames(
327 [in,ref] policy_handle *domain_handle,
328 [in,range(0,1000)] uint32 num_names,
329 [in,size_is(1000),length_is(num_names)] samr_String names[],
335 /************************/
340 [size_is(count)] samr_String *names;
343 NTSTATUS samr_LookupRids(
344 [in,ref] policy_handle *domain_handle,
345 [in,range(0,1000)] uint32 num_rids,
346 [in,size_is(1000),length_is(num_rids)] uint32 rids[],
347 [out] samr_Strings names,
351 /************************/
353 NTSTATUS samr_OpenGroup(
354 [in,ref] policy_handle *domain_handle,
355 [in] uint32 access_mask,
357 [out,ref] policy_handle *group_handle
361 /************************/
368 samr_String description;
376 samr_String description;
377 } samr_GroupInfoDesciption;
383 GROUPINFODESCRIPTION = 4,
385 } samr_GroupInfoEnum;
387 typedef [switch_type(samr_GroupInfoEnum)] union {
388 [case(GROUPINFOALL)] samr_GroupInfoAll all;
389 [case(GROUPINFONAME)] samr_String name;
390 [case(GROUPINFOX)] samr_GroupInfoX unknown;
391 [case(GROUPINFODESCRIPTION)] samr_String description;
392 [case(GROUPINFOALL2)] samr_GroupInfoAll all2;
395 NTSTATUS samr_QueryGroupInfo(
396 [in,ref] policy_handle *group_handle,
397 [in] samr_GroupInfoEnum level,
398 [out,switch_is(level)] samr_GroupInfo *info
401 /************************/
403 NTSTATUS samr_SetGroupInfo(
404 [in,ref] policy_handle *group_handle,
405 [in] samr_GroupInfoEnum level,
406 [in,switch_is(level),ref] samr_GroupInfo *info
409 /************************/
411 NTSTATUS samr_AddGroupMember(
412 [in,ref] policy_handle *group_handle,
417 /************************/
419 NTSTATUS samr_DeleteDomainGroup(
420 [in,out,ref] policy_handle *group_handle
423 /************************/
425 NTSTATUS samr_DeleteGroupMember(
426 [in,ref] policy_handle *group_handle,
431 /************************/
435 [size_is(count)] uint32 *rids[];
436 [size_is(count)] uint32 *types[];
439 NTSTATUS samr_QueryGroupMember(
440 [in,ref] policy_handle *group_handle,
441 [out] samr_RidTypeArray *rids
445 /************************/
449 win2003 seems to accept any data at all for the two integers
450 below, and doesn't seem to do anything with them that I can
451 see. Weird. I really expected the first integer to be a rid
452 and the second to be the attributes for that rid member.
454 NTSTATUS samr_SetMemberAttributesOfGroup(
455 [in,ref] policy_handle *group_handle,
456 [in] uint32 unknown1,
461 /************************/
463 NTSTATUS samr_OpenAlias (
464 [in,ref] policy_handle *domain_handle,
465 [in] uint32 access_mask,
467 [out,ref] policy_handle *alias_handle
471 /************************/
477 samr_String description;
483 ALIASINFODESCRIPTION = 3
484 } samr_AliasInfoEnum;
486 typedef [switch_type(samr_AliasInfoEnum)] union {
487 [case(ALIASINFOALL)] samr_AliasInfoAll all;
488 [case(ALIASINFONAME)] samr_String name;
489 [case(ALIASINFODESCRIPTION)] samr_String description;
492 NTSTATUS samr_QueryAliasInfo(
493 [in,ref] policy_handle *alias_handle,
494 [in] samr_AliasInfoEnum level,
495 [out,switch_is(level)] samr_AliasInfo *info
498 /************************/
500 NTSTATUS samr_SetAliasInfo(
501 [in,ref] policy_handle *alias_handle,
502 [in] samr_AliasInfoEnum level,
503 [in,switch_is(level),ref] samr_AliasInfo *info
506 /************************/
508 NTSTATUS samr_DeleteDomAlias(
509 [in,out,ref] policy_handle *alias_handle
512 /************************/
514 NTSTATUS samr_AddAliasMember(
515 [in,ref] policy_handle *alias_handle,
516 [in,ref] dom_sid2 *sid
519 /************************/
521 NTSTATUS samr_DeleteAliasMember(
522 [in,ref] policy_handle *alias_handle,
523 [in,ref] dom_sid2 *sid
526 /************************/
528 NTSTATUS samr_GetMembersInAlias(
529 [in,ref] policy_handle *alias_handle,
530 [out,ref] lsa_SidArray *sids
533 /************************/
535 NTSTATUS samr_OpenUser(
536 [in,ref] policy_handle *domain_handle,
537 [in] uint32 access_mask,
539 [out,ref] policy_handle *user_handle
542 /************************/
544 NTSTATUS samr_DeleteUser(
545 [in,out,ref] policy_handle *user_handle
548 /************************/
551 samr_String account_name;
552 samr_String full_name;
554 samr_String description;
560 samr_String unknown; /* settable, but doesn't stick. probably obsolete */
565 /* this is also used in samr and netlogon */
566 typedef [public, flag(NDR_PAHEX)] struct {
567 uint16 units_per_week;
568 [size_is(1260), length_is(units_per_week/8)] uint8 *bits[];
572 samr_String account_name;
573 samr_String full_name;
576 samr_String home_directory;
577 samr_String home_drive;
578 samr_String logon_script;
579 samr_String profile_path;
580 samr_String workstations;
583 NTTIME last_password_change;
584 NTTIME allow_password_change;
585 NTTIME force_password_change;
586 samr_LogonHours logon_hours;
587 uint16 bad_password_count;
589 samr_AcctFlags acct_flags;
593 samr_LogonHours logon_hours;
597 samr_String account_name;
598 samr_String full_name;
601 samr_String home_directory;
602 samr_String home_drive;
603 samr_String logon_script;
604 samr_String profile_path;
605 samr_String description;
606 samr_String workstations;
609 samr_LogonHours logon_hours;
610 uint16 bad_password_count;
612 NTTIME last_password_change;
614 samr_AcctFlags acct_flags;
618 samr_String account_name;
619 samr_String full_name;
623 samr_String account_name;
627 samr_String full_name;
635 samr_String home_directory;
636 samr_String home_drive;
640 samr_String logon_script;
644 samr_String profile_path;
648 samr_String description;
652 samr_String workstations;
656 samr_AcctFlags acct_flags;
664 samr_String parameters;
667 /* this defines the bits used for fields_present in info21 */
668 typedef [bitmap32bit] bitmap {
669 SAMR_FIELD_ACCOUNT_NAME = 0x00000001,
670 SAMR_FIELD_FULL_NAME = 0x00000002,
671 SAMR_FIELD_DESCRIPTION = 0x00000010,
672 SAMR_FIELD_COMMENT = 0x00000020,
673 SAMR_FIELD_LOGON_SCRIPT = 0x00000100,
674 SAMR_FIELD_PROFILE_PATH = 0x00000200,
675 SAMR_FIELD_WORKSTATIONS = 0x00000400,
676 SAMR_FIELD_LOGON_HOURS = 0x00002000,
677 SAMR_FIELD_ACCT_FLAGS = 0x00100000,
678 SAMR_FIELD_PARAMETERS = 0x00200000,
679 SAMR_FIELD_COUNTRY_CODE = 0x00400000,
680 SAMR_FIELD_CODE_PAGE = 0x00800000,
681 SAMR_FIELD_PASSWORD = 0x01000000, /* either of these */
682 SAMR_FIELD_PASSWORD2 = 0x02000000 /* two bits seems to work */
683 } samr_FieldsPresent;
688 NTTIME last_password_change;
690 NTTIME allow_password_change;
691 NTTIME force_password_change;
692 samr_String account_name;
693 samr_String full_name;
694 samr_String home_directory;
695 samr_String home_drive;
696 samr_String logon_script;
697 samr_String profile_path;
698 samr_String description;
699 samr_String workstations;
701 samr_String parameters;
702 samr_String unknown1;
703 samr_String unknown2;
704 samr_String unknown3;
706 [size_is(buf_count)] uint8 *buffer[];
709 samr_AcctFlags acct_flags;
710 samr_FieldsPresent fields_present;
711 samr_LogonHours logon_hours;
712 uint16 bad_password_count;
716 uint8 nt_password_set;
717 uint8 lm_password_set;
718 uint8 password_expired;
722 typedef [public, flag(NDR_PAHEX)] struct {
724 } samr_CryptPassword;
727 samr_UserInfo21 info;
728 samr_CryptPassword password;
732 samr_CryptPassword password;
736 typedef [flag(NDR_PAHEX)] struct {
738 } samr_CryptPasswordEx;
741 samr_UserInfo21 info;
742 samr_CryptPasswordEx password;
746 samr_CryptPasswordEx password;
750 typedef [switch_type(uint16)] union {
751 [case(1)] samr_UserInfo1 info1;
752 [case(2)] samr_UserInfo2 info2;
753 [case(3)] samr_UserInfo3 info3;
754 [case(4)] samr_UserInfo4 info4;
755 [case(5)] samr_UserInfo5 info5;
756 [case(6)] samr_UserInfo6 info6;
757 [case(7)] samr_UserInfo7 info7;
758 [case(8)] samr_UserInfo8 info8;
759 [case(9)] samr_UserInfo9 info9;
760 [case(10)] samr_UserInfo10 info10;
761 [case(11)] samr_UserInfo11 info11;
762 [case(12)] samr_UserInfo12 info12;
763 [case(13)] samr_UserInfo13 info13;
764 [case(14)] samr_UserInfo14 info14;
765 [case(16)] samr_UserInfo16 info16;
766 [case(17)] samr_UserInfo17 info17;
767 [case(20)] samr_UserInfo20 info20;
768 [case(21)] samr_UserInfo21 info21;
769 [case(23)] samr_UserInfo23 info23;
770 [case(24)] samr_UserInfo24 info24;
771 [case(25)] samr_UserInfo25 info25;
772 [case(26)] samr_UserInfo26 info26;
775 NTSTATUS samr_QueryUserInfo(
776 [in,ref] policy_handle *user_handle,
778 [out,switch_is(level)] samr_UserInfo *info
782 /************************/
784 NTSTATUS samr_SetUserInfo(
785 [in,ref] policy_handle *user_handle,
787 [in,ref,switch_is(level)] samr_UserInfo *info
790 /************************/
792 typedef [public, flag(NDR_PAHEX)] struct {
797 this is a password change interface that doesn't give
798 the server the plaintext password. Depricated.
800 NTSTATUS samr_ChangePasswordUser(
801 [in,ref] policy_handle *user_handle,
802 [in] bool8 lm_present,
803 [in] samr_Password *old_lm_crypted,
804 [in] samr_Password *new_lm_crypted,
805 [in] bool8 nt_present,
806 [in] samr_Password *old_nt_crypted,
807 [in] samr_Password *new_nt_crypted,
808 [in] bool8 cross1_present,
809 [in] samr_Password *nt_cross,
810 [in] bool8 cross2_present,
811 [in] samr_Password *lm_cross
814 /************************/
817 typedef [public] struct {
822 typedef [public] struct {
824 [size_is(count)] samr_RidWithType *rids[];
825 } samr_RidWithTypeArray;
827 NTSTATUS samr_GetGroupsForUser(
828 [in,ref] policy_handle *user_handle,
829 [out] samr_RidWithTypeArray *rids
832 /************************/
838 samr_AcctFlags acct_flags;
839 samr_String account_name;
840 samr_String full_name;
841 samr_String description;
842 } samr_DispEntryGeneral;
846 [size_is(count)] samr_DispEntryGeneral *entries[];
847 } samr_DispInfoGeneral;
852 samr_AcctFlags acct_flags;
853 samr_String account_name;
854 samr_String description;
855 } samr_DispEntryFull;
859 [size_is(count)] samr_DispEntryFull *entries[];
863 [value(strlen_m(r->string))] uint16 length;
864 [value(strlen_m(r->string))] uint16 size;
865 ascstr_noterm *string;
870 samr_AsciiName account_name;
871 } samr_DispEntryAscii;
875 [size_is(count)] samr_DispEntryAscii *entries[];
876 } samr_DispInfoAscii;
878 typedef [switch_type(uint16)] union {
879 [case(1)] samr_DispInfoGeneral info1;/* users */
880 [case(2)] samr_DispInfoFull info2; /* trust accounts? */
881 [case(3)] samr_DispInfoFull info3; /* groups */
882 [case(4)] samr_DispInfoAscii info4; /* users */
883 [case(5)] samr_DispInfoAscii info5; /* groups */
886 NTSTATUS samr_QueryDisplayInfo(
887 [in,ref] policy_handle *domain_handle,
889 [in] uint32 start_idx,
890 [in] uint32 max_entries,
891 [in] uint32 buf_size,
892 [out] uint32 total_size,
893 [out] uint32 returned_size,
894 [out,switch_is(level)] samr_DispInfo info
898 /************************/
902 this seems to be an alphabetic search function. The returned index
903 is the index for samr_QueryDisplayInfo needed to get names occurring
904 after the specified name. The supplied name does not need to exist
905 in the database (for example you can supply just a first letter for
906 searching starting at that letter)
908 The level corresponds to the samr_QueryDisplayInfo level
910 NTSTATUS samr_GetDisplayEnumerationIndex(
911 [in,ref] policy_handle *domain_handle,
913 [in] samr_String name,
919 /************************/
923 w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
925 NTSTATUS samr_TestPrivateFunctionsDomain(
926 [in,ref] policy_handle *domain_handle
930 /************************/
934 w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
936 NTSTATUS samr_TestPrivateFunctionsUser(
937 [in,ref] policy_handle *user_handle
941 /************************/
944 /* password properties flags */
945 const uint32 DOMAIN_PASSWORD_COMPLEX = 0x00000001;
946 const uint32 DOMAIN_PASSWORD_NO_ANON_CHANGE = 0x00000002;
947 const uint32 DOMAIN_PASSWORD_NO_CLEAR_CHANGE = 0x00000004;
948 const uint32 DOMAIN_PASSWORD_STORE_CLEARTEXT = 0x00000010;
949 const uint32 DOMAIN_REFUSE_PASSWORD_CHANGE = 0x00000020;
952 uint16 min_password_length;
953 uint32 password_properties;
956 NTSTATUS samr_GetUserPwInfo(
957 [in,ref] policy_handle *user_handle,
958 [out] samr_PwInfo info
961 /************************/
963 NTSTATUS samr_RemoveMemberFromForeignDomain(
964 [in,ref] policy_handle *domain_handle,
965 [in,ref] dom_sid2 *sid
968 /************************/
972 how is this different from QueryDomainInfo ??
974 NTSTATUS samr_QueryDomainInfo2(
975 [in,ref] policy_handle *domain_handle,
977 [out,switch_is(level)] samr_DomainInfo *info
980 /************************/
984 how is this different from QueryUserInfo ??
986 NTSTATUS samr_QueryUserInfo2(
987 [in,ref] policy_handle *user_handle,
989 [out,switch_is(level)] samr_UserInfo *info
992 /************************/
996 how is this different from QueryDisplayInfo??
998 NTSTATUS samr_QueryDisplayInfo2(
999 [in,ref] policy_handle *domain_handle,
1001 [in] uint32 start_idx,
1002 [in] uint32 max_entries,
1003 [in] uint32 buf_size,
1004 [out] uint32 total_size,
1005 [out] uint32 returned_size,
1006 [out,switch_is(level)] samr_DispInfo info
1009 /************************/
1013 how is this different from GetDisplayEnumerationIndex ??
1015 NTSTATUS samr_GetDisplayEnumerationIndex2(
1016 [in,ref] policy_handle *domain_handle,
1018 [in] samr_String name,
1023 /************************/
1025 NTSTATUS samr_CreateUser2(
1026 [in,ref] policy_handle *domain_handle,
1027 [in,ref] samr_String *account_name,
1028 [in] samr_AcctFlags acct_flags,
1029 [in] uint32 access_mask,
1030 [out,ref] policy_handle *user_handle,
1031 [out,ref] uint32 *access_granted,
1032 [out,ref] uint32 *rid
1036 /************************/
1040 another duplicate. There must be a reason ....
1042 NTSTATUS samr_QueryDisplayInfo3(
1043 [in,ref] policy_handle *domain_handle,
1045 [in] uint32 start_idx,
1046 [in] uint32 max_entries,
1047 [in] uint32 buf_size,
1048 [out] uint32 total_size,
1049 [out] uint32 returned_size,
1050 [out,switch_is(level)] samr_DispInfo info
1053 /************************/
1055 NTSTATUS samr_AddMultipleMembersToAlias(
1056 [in,ref] policy_handle *alias_handle,
1057 [in,ref] lsa_SidArray *sids
1060 /************************/
1062 NTSTATUS samr_RemoveMultipleMembersFromAlias(
1063 [in,ref] policy_handle *alias_handle,
1064 [in,ref] lsa_SidArray *sids
1067 /************************/
1070 NTSTATUS samr_OemChangePasswordUser2(
1071 [in] samr_AsciiName *server,
1072 [in,ref] samr_AsciiName *account,
1073 [in] samr_CryptPassword *password,
1074 [in] samr_Password *hash
1077 /************************/
1079 NTSTATUS samr_ChangePasswordUser2(
1080 [in] samr_String *server,
1081 [in,ref] samr_String *account,
1082 [in] samr_CryptPassword *nt_password,
1083 [in] samr_Password *nt_verifier,
1084 [in] bool8 lm_change,
1085 [in] samr_CryptPassword *lm_password,
1086 [in] samr_Password *lm_verifier
1089 /************************/
1091 NTSTATUS samr_GetDomPwInfo(
1092 [in] samr_String *domain_name,
1093 [out] samr_PwInfo info
1096 /************************/
1098 NTSTATUS samr_Connect2(
1099 [in] unistr *system_name,
1100 [in] uint32 access_mask,
1101 [out,ref] policy_handle *connect_handle
1104 /************************/
1107 seems to be an exact alias for samr_SetUserInfo()
1109 NTSTATUS samr_SetUserInfo2(
1110 [in,ref] policy_handle *user_handle,
1112 [in,ref,switch_is(level)] samr_UserInfo *info
1115 /************************/
1118 this one is mysterious. I have a few guesses, but nothing working yet
1120 NTSTATUS samr_SetBootKeyInformation(
1121 [in,ref] policy_handle *connect_handle,
1122 [in] uint32 unknown1,
1123 [in] uint32 unknown2,
1124 [in] uint32 unknown3
1127 /************************/
1129 NTSTATUS samr_GetBootKeyInformation(
1130 [in,ref] policy_handle *domain_handle,
1131 [out] uint32 unknown
1134 /************************/
1136 NTSTATUS samr_Connect3(
1137 [in] unistr *system_name,
1138 /* this unknown value seems to be completely ignored by w2k3 */
1139 [in] uint32 unknown,
1140 [in] uint32 access_mask,
1141 [out,ref] policy_handle *connect_handle
1144 /************************/
1146 NTSTATUS samr_Connect4(
1147 [in] unistr *system_name,
1148 [in] uint32 unknown,
1149 [in] uint32 access_mask,
1150 [out,ref] policy_handle *connect_handle
1153 /************************/
1156 typedef [v1_enum] enum {
1157 SAMR_REJECT_OTHER = 0,
1158 SAMR_REJECT_TOO_SHORT = 1,
1159 SAMR_REJECT_COMPLEXITY = 2
1160 } samr_RejectReason;
1163 samr_RejectReason reason;
1166 } samr_ChangeReject;
1168 NTSTATUS samr_ChangePasswordUser3(
1169 [in] samr_String *server,
1170 [in,ref] samr_String *account,
1171 [in] samr_CryptPassword *nt_password,
1172 [in] samr_Password *nt_verifier,
1173 [in] bool8 lm_change,
1174 [in] samr_CryptPassword *lm_password,
1175 [in] samr_Password *lm_verifier,
1176 [in] samr_CryptPassword *password3,
1177 [out] samr_DomInfo1 *dominfo,
1178 [out] samr_ChangeReject *reject
1181 /************************/
1185 uint32 unknown1; /* w2k3 gives 3 */
1186 uint32 unknown2; /* w2k3 gives 0 */
1187 } samr_ConnectInfo1;
1190 [case(1)] samr_ConnectInfo1 info1;
1193 NTSTATUS samr_Connect5(
1194 [in] unistr *system_name,
1195 [in] uint32 access_mask,
1196 [in,out] uint32 level,
1197 [in,out,switch_is(level),ref] samr_ConnectInfo *info,
1198 [out,ref] policy_handle *connect_handle
1201 /************************/
1203 NTSTATUS samr_RidToSid(
1204 [in,ref] policy_handle *domain_handle,
1210 /************************/
1214 this should set the DSRM password for the server, which is used
1215 when booting into Directory Services Recovery Mode on a DC. Win2003
1216 gives me NT_STATUS_NOT_SUPPORTED
1219 NTSTATUS samr_SetDsrmPassword(
1220 [in] samr_String *name,
1221 [in] uint32 unknown,
1222 [in] samr_Password *hash
1226 /************************/
1229 I haven't been able to work out the format of this one yet.
1230 Seems to start with a switch level for a union?
1232 NTSTATUS samr_ValidatePassword();