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),
18 /* account control (acct_flags) bits */
19 typedef [public,bitmap32bit] bitmap {
20 ACB_DISABLED = 0x00000001, /* 1 = User account disabled */
21 ACB_HOMDIRREQ = 0x00000002, /* 1 = Home directory required */
22 ACB_PWNOTREQ = 0x00000004, /* 1 = User password not required */
23 ACB_TEMPDUP = 0x00000008, /* 1 = Temporary duplicate account */
24 ACB_NORMAL = 0x00000010, /* 1 = Normal user account */
25 ACB_MNS = 0x00000020, /* 1 = MNS logon user account */
26 ACB_DOMTRUST = 0x00000040, /* 1 = Interdomain trust account */
27 ACB_WSTRUST = 0x00000080, /* 1 = Workstation trust account */
28 ACB_SVRTRUST = 0x00000100, /* 1 = Server trust account */
29 ACB_PWNOEXP = 0x00000200, /* 1 = User password does not expire */
30 ACB_AUTOLOCK = 0x00000400 /* 1 = Account auto locked */
35 NTSTATUS samr_Connect (
36 /* notice the lack of [string] */
37 [in] uint16 *system_name,
38 [in] uint32 access_mask,
39 [out,ref] policy_handle *connect_handle
46 [in,out,ref] policy_handle *handle
52 NTSTATUS samr_SetSecurity (
53 [in,ref] policy_handle *handle,
55 [in,ref] sec_desc_buf *sdbuf
61 NTSTATUS samr_QuerySecurity (
62 [in,ref] policy_handle *handle,
64 [out] sec_desc_buf *sdbuf
71 shutdown the SAM - once you call this the SAM will be dead
73 NTSTATUS samr_Shutdown (
74 [in,ref] policy_handle *connect_handle
80 [value(2*strlen_m(r->string))] uint16 length;
81 [value(r->length)] uint16 size;
82 unistr_noterm *string;
85 NTSTATUS samr_LookupDomain (
86 [in,ref] policy_handle *connect_handle,
87 [in,ref] samr_String *domain_name,
102 [size_is(count)] samr_SamEntry *entries[];
105 NTSTATUS samr_EnumDomains (
106 [in,ref] policy_handle *connect_handle,
107 [in,out,ref] uint32 *resume_handle,
108 [in] uint32 buf_size,
109 [out] samr_SamArray *sam,
110 [out] uint32 num_entries
114 /************************/
116 NTSTATUS samr_OpenDomain(
117 [in,ref] policy_handle *connect_handle,
118 [in] uint32 access_mask,
119 [in,ref] dom_sid2 *sid,
120 [out,ref] policy_handle *domain_handle
123 /************************/
126 typedef [v1_enum] enum {
128 ROLE_DOMAIN_MEMBER = 1,
134 uint16 min_password_length;
135 uint16 password_history_length;
136 uint32 password_properties;
137 /* yes, these are signed. They are in negative 100ns */
138 dlong max_password_age;
139 dlong min_password_age;
143 NTTIME force_logoff_time;
145 samr_String domain_name;
146 samr_String primary; /* PDC name if this is a BDC */
157 NTTIME force_logoff_time;
165 samr_String domain_name;
178 NTTIME domain_create_time;
182 uint32 unknown; /* w2k3 returns 1 */
187 hyper lockout_duration;
188 hyper lockout_window;
189 uint16 lockout_threshold;
193 hyper lockout_duration;
194 hyper lockout_window;
195 uint16 lockout_threshold;
200 NTTIME domain_create_time;
205 typedef [switch_type(uint16)] union {
206 [case(1)] samr_DomInfo1 info1;
207 [case(2)] samr_DomInfo2 info2;
208 [case(3)] samr_DomInfo3 info3;
209 [case(4)] samr_DomInfo4 info4;
210 [case(5)] samr_DomInfo5 info5;
211 [case(6)] samr_DomInfo6 info6;
212 [case(7)] samr_DomInfo7 info7;
213 [case(8)] samr_DomInfo8 info8;
214 [case(9)] samr_DomInfo9 info9;
215 [case(11)] samr_DomInfo11 info11;
216 [case(12)] samr_DomInfo12 info12;
217 [case(13)] samr_DomInfo13 info13;
220 NTSTATUS samr_QueryDomainInfo(
221 [in,ref] policy_handle *domain_handle,
223 [out,switch_is(level)] samr_DomainInfo *info
226 /************************/
229 only levels 1, 3, 4, 6, 7, 9, 12 are valid for this
232 NTSTATUS samr_SetDomainInfo(
233 [in,ref] policy_handle *domain_handle,
235 [in,switch_is(level),ref] samr_DomainInfo *info
239 /************************/
241 NTSTATUS samr_CreateDomainGroup(
242 [in,ref] policy_handle *domain_handle,
243 [in,ref] samr_String *name,
244 [in] uint32 access_mask,
245 [out,ref] policy_handle *group_handle,
246 [out,ref] uint32 *rid
250 /************************/
252 NTSTATUS samr_EnumDomainGroups(
253 [in,ref] policy_handle *domain_handle,
254 [in,out,ref] uint32 *resume_handle,
255 [in] uint32 max_size,
256 [out] samr_SamArray *sam,
257 [out] uint32 num_entries
260 /************************/
262 NTSTATUS samr_CreateUser(
263 [in,ref] policy_handle *domain_handle,
264 [in,ref] samr_String *account_name,
265 [in] uint32 access_mask,
266 [out,ref] policy_handle *user_handle,
267 [out,ref] uint32 *rid
270 /************************/
274 /* w2k3 treats max_size as max_users*54 and sets the
275 resume_handle as the rid of the last user sent
277 const int SAMR_ENUM_USERS_MULTIPLIER = 54;
279 NTSTATUS samr_EnumDomainUsers(
280 [in,ref] policy_handle *domain_handle,
281 [in,out,ref] uint32 *resume_handle,
282 [in] samr_AcctFlags acct_flags,
283 [in] uint32 max_size,
284 [out] samr_SamArray *sam,
285 [out] uint32 num_entries
288 /************************/
290 NTSTATUS samr_CreateDomAlias(
291 [in,ref] policy_handle *domain_handle,
292 [in,ref] samr_String *aliasname,
293 [in] uint32 access_mask,
294 [out,ref] policy_handle *alias_handle,
295 [out,ref] uint32 *rid
298 /************************/
300 NTSTATUS samr_EnumDomainAliases(
301 [in,ref] policy_handle *domain_handle,
302 [in,out,ref] uint32 *resume_handle,
303 [in] samr_AcctFlags acct_flags,
304 [out] samr_SamArray *sam,
305 [out] uint32 num_entries
308 /************************/
312 [range(0,1024)] uint32 count;
313 [size_is(count)] uint32 *ids[];
316 NTSTATUS samr_GetAliasMembership(
317 [in,ref] policy_handle *domain_handle,
318 [in,ref] lsa_SidArray *sids,
319 [out,ref] samr_Ids *rids
322 /************************/
325 NTSTATUS samr_LookupNames(
326 [in,ref] policy_handle *domain_handle,
327 [in,range(0,1000)] uint32 num_names,
328 [in,size_is(1000),length_is(num_names)] samr_String names[],
334 /************************/
339 [size_is(count)] samr_String *names[];
342 NTSTATUS samr_LookupRids(
343 [in,ref] policy_handle *domain_handle,
344 [in,range(0,1000)] uint32 num_rids,
345 [in,size_is(1000),length_is(num_rids)] uint32 rids[],
346 [out] samr_Strings names,
350 /************************/
352 NTSTATUS samr_OpenGroup(
353 [in,ref] policy_handle *domain_handle,
354 [in] uint32 access_mask,
356 [out,ref] policy_handle *group_handle
360 /************************/
367 samr_String description;
375 samr_String description;
376 } samr_GroupInfoDesciption;
382 GROUPINFODESCRIPTION = 4,
384 } samr_GroupInfoEnum;
386 typedef [switch_type(samr_GroupInfoEnum)] union {
387 [case(GROUPINFOALL)] samr_GroupInfoAll all;
388 [case(GROUPINFONAME)] samr_String name;
389 [case(GROUPINFOX)] samr_GroupInfoX unknown;
390 [case(GROUPINFODESCRIPTION)] samr_String description;
391 [case(GROUPINFOALL2)] samr_GroupInfoAll all2;
394 NTSTATUS samr_QueryGroupInfo(
395 [in,ref] policy_handle *group_handle,
396 [in] samr_GroupInfoEnum level,
397 [out,switch_is(level)] samr_GroupInfo *info
400 /************************/
402 NTSTATUS samr_SetGroupInfo(
403 [in,ref] policy_handle *group_handle,
404 [in] samr_GroupInfoEnum level,
405 [in,switch_is(level),ref] samr_GroupInfo *info
408 /************************/
410 NTSTATUS samr_AddGroupMember(
411 [in,ref] policy_handle *group_handle,
416 /************************/
418 NTSTATUS samr_DeleteDomainGroup(
419 [in,out,ref] policy_handle *group_handle
422 /************************/
424 NTSTATUS samr_DeleteGroupMember(
425 [in,ref] policy_handle *group_handle,
430 /************************/
434 [size_is(count)] uint32 *rids[];
435 [size_is(count)] uint32 *unknown[];
438 NTSTATUS samr_QueryGroupMember(
439 [in,ref] policy_handle *group_handle,
440 [out] samr_ridArray *rids
444 /************************/
448 win2003 seems to accept any data at all for the two integers
449 below, and doesn't seem to do anything with them that I can
450 see. Weird. I really expected the first integer to be a rid
451 and the second to be the attributes for that rid member.
453 NTSTATUS samr_SetMemberAttributesOfGroup(
454 [in,ref] policy_handle *group_handle,
455 [in] uint32 unknown1,
460 /************************/
462 NTSTATUS samr_OpenAlias (
463 [in,ref] policy_handle *domain_handle,
464 [in] uint32 access_mask,
466 [out,ref] policy_handle *alias_handle
470 /************************/
476 samr_String description;
482 ALIASINFODESCRIPTION = 3
483 } samr_AliasInfoEnum;
485 typedef [switch_type(samr_AliasInfoEnum)] union {
486 [case(ALIASINFOALL)] samr_AliasInfoAll all;
487 [case(ALIASINFONAME)] samr_String name;
488 [case(ALIASINFODESCRIPTION)] samr_String description;
491 NTSTATUS samr_QueryAliasInfo(
492 [in,ref] policy_handle *alias_handle,
493 [in] samr_AliasInfoEnum level,
494 [out,switch_is(level)] samr_AliasInfo *info
497 /************************/
499 NTSTATUS samr_SetAliasInfo(
500 [in,ref] policy_handle *alias_handle,
501 [in] samr_AliasInfoEnum level,
502 [in,switch_is(level),ref] samr_AliasInfo *info
505 /************************/
507 NTSTATUS samr_DeleteDomAlias(
508 [in,out,ref] policy_handle *alias_handle
511 /************************/
513 NTSTATUS samr_AddAliasMember(
514 [in,ref] policy_handle *alias_handle,
515 [in,ref] dom_sid2 *sid
518 /************************/
520 NTSTATUS samr_DeleteAliasMember(
521 [in,ref] policy_handle *alias_handle,
522 [in,ref] dom_sid2 *sid
525 /************************/
527 NTSTATUS samr_GetMembersInAlias(
528 [in,ref] policy_handle *alias_handle,
529 [out,ref] lsa_SidArray *sids
532 /************************/
534 NTSTATUS samr_OpenUser(
535 [in,ref] policy_handle *domain_handle,
536 [in] uint32 access_mask,
538 [out,ref] policy_handle *user_handle
541 /************************/
543 NTSTATUS samr_DeleteUser(
544 [in,out,ref] policy_handle *user_handle
547 /************************/
550 samr_String account_name;
551 samr_String full_name;
553 samr_String description;
559 samr_String unknown; /* settable, but doesn't stick. probably obsolete */
564 /* this is also used in samr and netlogon */
565 typedef [public, flag(NDR_PAHEX)] struct {
566 uint16 units_per_week;
567 [size_is(1260), length_is(units_per_week/8)] uint8 *bits[];
571 samr_String account_name;
572 samr_String full_name;
575 samr_String home_directory;
576 samr_String home_drive;
577 samr_String logon_script;
578 samr_String profile_path;
579 samr_String workstations;
582 NTTIME last_password_change;
583 NTTIME allow_password_change;
584 NTTIME force_password_change;
585 samr_LogonHours logon_hours;
586 uint16 bad_password_count;
588 samr_AcctFlags acct_flags;
592 samr_LogonHours logon_hours;
596 samr_String account_name;
597 samr_String full_name;
600 samr_String home_directory;
601 samr_String home_drive;
602 samr_String logon_script;
603 samr_String profile_path;
604 samr_String description;
605 samr_String workstations;
608 samr_LogonHours logon_hours;
609 uint16 bad_password_count;
611 NTTIME last_password_change;
613 samr_AcctFlags acct_flags;
617 samr_String account_name;
618 samr_String full_name;
622 samr_String account_name;
626 samr_String full_name;
634 samr_String home_directory;
635 samr_String home_drive;
639 samr_String logon_script;
643 samr_String profile_path;
647 samr_String description;
651 samr_String workstations;
655 samr_AcctFlags acct_flags;
663 samr_String parameters;
666 /* this defines the bits used for fields_present in info21 */
667 typedef [bitmap32bit] bitmap {
668 SAMR_FIELD_ACCOUNT_NAME = 0x00000001,
669 SAMR_FIELD_FULL_NAME = 0x00000002,
670 SAMR_FIELD_DESCRIPTION = 0x00000010,
671 SAMR_FIELD_COMMENT = 0x00000020,
672 SAMR_FIELD_LOGON_SCRIPT = 0x00000100,
673 SAMR_FIELD_PROFILE_PATH = 0x00000200,
674 SAMR_FIELD_WORKSTATION = 0x00000400,
675 SAMR_FIELD_LOGON_HOURS = 0x00002000,
676 SAMR_FIELD_ACCT_FLAGS = 0x00100000,
677 SAMR_FIELD_PARAMETERS = 0x00200000,
678 SAMR_FIELD_COUNTRY_CODE = 0x00400000,
679 SAMR_FIELD_CODE_PAGE = 0x00800000,
680 SAMR_FIELD_PASSWORD = 0x01000000, /* either of these */
681 SAMR_FIELD_PASSWORD2 = 0x02000000 /* two bits seems to work */
682 } samr_FieldsPresent;
687 NTTIME last_password_change;
689 NTTIME allow_password_change;
690 NTTIME force_password_change;
691 samr_String account_name;
692 samr_String full_name;
693 samr_String home_directory;
694 samr_String home_drive;
695 samr_String logon_script;
696 samr_String profile_path;
697 samr_String description;
698 samr_String workstations;
700 samr_String parameters;
701 samr_String unknown1;
702 samr_String unknown2;
703 samr_String unknown3;
705 [size_is(buf_count)] uint8 *buffer[];
708 samr_AcctFlags acct_flags;
709 samr_FieldsPresent fields_present;
710 samr_LogonHours logon_hours;
711 uint16 bad_password_count;
715 uint8 nt_password_set;
716 uint8 lm_password_set;
717 uint8 password_expired;
721 typedef [public, flag(NDR_PAHEX)] struct {
723 } samr_CryptPassword;
726 samr_UserInfo21 info;
727 samr_CryptPassword password;
731 samr_CryptPassword password;
735 typedef [flag(NDR_PAHEX)] struct {
737 } samr_CryptPasswordEx;
740 samr_UserInfo21 info;
741 samr_CryptPasswordEx password;
745 samr_CryptPasswordEx password;
749 typedef [switch_type(uint16)] union {
750 [case(1)] samr_UserInfo1 info1;
751 [case(2)] samr_UserInfo2 info2;
752 [case(3)] samr_UserInfo3 info3;
753 [case(4)] samr_UserInfo4 info4;
754 [case(5)] samr_UserInfo5 info5;
755 [case(6)] samr_UserInfo6 info6;
756 [case(7)] samr_UserInfo7 info7;
757 [case(8)] samr_UserInfo8 info8;
758 [case(9)] samr_UserInfo9 info9;
759 [case(10)] samr_UserInfo10 info10;
760 [case(11)] samr_UserInfo11 info11;
761 [case(12)] samr_UserInfo12 info12;
762 [case(13)] samr_UserInfo13 info13;
763 [case(14)] samr_UserInfo14 info14;
764 [case(16)] samr_UserInfo16 info16;
765 [case(17)] samr_UserInfo17 info17;
766 [case(20)] samr_UserInfo20 info20;
767 [case(21)] samr_UserInfo21 info21;
768 [case(23)] samr_UserInfo23 info23;
769 [case(24)] samr_UserInfo24 info24;
770 [case(25)] samr_UserInfo25 info25;
771 [case(26)] samr_UserInfo26 info26;
774 NTSTATUS samr_QueryUserInfo(
775 [in,ref] policy_handle *user_handle,
777 [out,switch_is(level)] samr_UserInfo *info
781 /************************/
783 NTSTATUS samr_SetUserInfo(
784 [in,ref] policy_handle *user_handle,
786 [in,ref,switch_is(level)] samr_UserInfo *info
789 /************************/
791 typedef [public, flag(NDR_PAHEX)] struct {
796 this is a password change interface that doesn't give
797 the server the plaintext password. Depricated.
799 NTSTATUS samr_ChangePasswordUser(
800 [in,ref] policy_handle *user_handle,
801 [in] bool8 lm_present,
802 [in] samr_Password *old_lm_crypted,
803 [in] samr_Password *new_lm_crypted,
804 [in] bool8 nt_present,
805 [in] samr_Password *old_nt_crypted,
806 [in] samr_Password *new_nt_crypted,
807 [in] bool8 cross1_present,
808 [in] samr_Password *nt_cross,
809 [in] bool8 cross2_present,
810 [in] samr_Password *lm_cross
813 /************************/
823 [size_is(count)] samr_RidType *rid[];
826 NTSTATUS samr_GetGroupsForUser(
827 [in,ref] policy_handle *user_handle,
828 [out] samr_RidArray *rids
831 /************************/
837 samr_AcctFlags acct_flags;
838 samr_String account_name;
839 samr_String full_name;
840 samr_String description;
841 } samr_DispEntryGeneral;
845 [size_is(count)] samr_DispEntryGeneral *entries[];
846 } samr_DispInfoGeneral;
851 samr_AcctFlags acct_flags;
852 samr_String account_name;
853 samr_String description;
854 } samr_DispEntryFull;
858 [size_is(count)] samr_DispEntryFull *entries[];
862 [value(strlen_m(r->string))] uint16 length;
863 [value(strlen_m(r->string))] uint16 size;
864 ascstr_noterm *string;
869 samr_AsciiName account_name;
870 } samr_DispEntryAscii;
874 [size_is(count)] samr_DispEntryAscii *entries[];
875 } samr_DispInfoAscii;
877 typedef [switch_type(uint16)] union {
878 [case(1)] samr_DispInfoGeneral info1;/* users */
879 [case(2)] samr_DispInfoFull info2; /* trust accounts? */
880 [case(3)] samr_DispInfoFull info3; /* groups */
881 [case(4)] samr_DispInfoAscii info4; /* users */
882 [case(5)] samr_DispInfoAscii info5; /* groups */
885 NTSTATUS samr_QueryDisplayInfo(
886 [in,ref] policy_handle *domain_handle,
888 [in] uint32 start_idx,
889 [in] uint32 max_entries,
890 [in] uint32 buf_size,
891 [out] uint32 total_size,
892 [out] uint32 returned_size,
893 [out,switch_is(level)] samr_DispInfo info
897 /************************/
901 this seems to be an alphabetic search function. The returned index
902 is the index for samr_QueryDisplayInfo needed to get names occurring
903 after the specified name. The supplied name does not need to exist
904 in the database (for example you can supply just a first letter for
905 searching starting at that letter)
907 The level corresponds to the samr_QueryDisplayInfo level
909 NTSTATUS samr_GetDisplayEnumerationIndex(
910 [in,ref] policy_handle *domain_handle,
912 [in] samr_String name,
918 /************************/
922 w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
924 NTSTATUS samr_TestPrivateFunctionsDomain(
925 [in,ref] policy_handle *domain_handle
929 /************************/
933 w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
935 NTSTATUS samr_TestPrivateFunctionsUser(
936 [in,ref] policy_handle *user_handle
940 /************************/
943 /* password properties flags */
944 const uint32 DOMAIN_PASSWORD_COMPLEX = 0x00000001;
945 const uint32 DOMAIN_PASSWORD_NO_ANON_CHANGE = 0x00000002;
946 const uint32 DOMAIN_PASSWORD_NO_CLEAR_CHANGE = 0x00000004;
947 const uint32 DOMAIN_PASSWORD_STORE_CLEARTEXT = 0x00000010;
948 const uint32 DOMAIN_REFUSE_PASSWORD_CHANGE = 0x00000020;
951 uint16 min_password_length;
952 uint32 password_properties;
955 NTSTATUS samr_GetUserPwInfo(
956 [in,ref] policy_handle *user_handle,
957 [out] samr_PwInfo info
960 /************************/
962 NTSTATUS samr_RemoveMemberFromForeignDomain(
963 [in,ref] policy_handle *domain_handle,
964 [in,ref] dom_sid2 *sid
967 /************************/
971 how is this different from QueryDomainInfo ??
973 NTSTATUS samr_QueryDomainInfo2(
974 [in,ref] policy_handle *domain_handle,
976 [out,switch_is(level)] samr_DomainInfo *info
979 /************************/
983 how is this different from QueryUserInfo ??
985 NTSTATUS samr_QueryUserInfo2(
986 [in,ref] policy_handle *user_handle,
988 [out,switch_is(level)] samr_UserInfo *info
991 /************************/
995 how is this different from QueryDisplayInfo??
997 NTSTATUS samr_QueryDisplayInfo2(
998 [in,ref] policy_handle *domain_handle,
1000 [in] uint32 start_idx,
1001 [in] uint32 max_entries,
1002 [in] uint32 buf_size,
1003 [out] uint32 total_size,
1004 [out] uint32 returned_size,
1005 [out,switch_is(level)] samr_DispInfo info
1008 /************************/
1012 how is this different from GetDisplayEnumerationIndex ??
1014 NTSTATUS samr_GetDisplayEnumerationIndex2(
1015 [in,ref] policy_handle *domain_handle,
1017 [in] samr_String name,
1022 /************************/
1024 NTSTATUS samr_CreateUser2(
1025 [in,ref] policy_handle *domain_handle,
1026 [in,ref] samr_String *account_name,
1027 [in] samr_AcctFlags acct_flags,
1028 [in] uint32 access_mask,
1029 [out,ref] policy_handle *user_handle,
1030 [out,ref] uint32 *access_granted,
1031 [out,ref] uint32 *rid
1035 /************************/
1039 another duplicate. There must be a reason ....
1041 NTSTATUS samr_QueryDisplayInfo3(
1042 [in,ref] policy_handle *domain_handle,
1044 [in] uint32 start_idx,
1045 [in] uint32 max_entries,
1046 [in] uint32 buf_size,
1047 [out] uint32 total_size,
1048 [out] uint32 returned_size,
1049 [out,switch_is(level)] samr_DispInfo info
1052 /************************/
1054 NTSTATUS samr_AddMultipleMembersToAlias(
1055 [in,ref] policy_handle *alias_handle,
1056 [in,ref] lsa_SidArray *sids
1059 /************************/
1061 NTSTATUS samr_RemoveMultipleMembersFromAlias(
1062 [in,ref] policy_handle *alias_handle,
1063 [in,ref] lsa_SidArray *sids
1066 /************************/
1069 NTSTATUS samr_OemChangePasswordUser2(
1070 [in] samr_AsciiName *server,
1071 [in,ref] samr_AsciiName *account,
1072 [in] samr_CryptPassword *password,
1073 [in] samr_Password *hash
1076 /************************/
1078 NTSTATUS samr_ChangePasswordUser2(
1079 [in] samr_String *server,
1080 [in,ref] samr_String *account,
1081 [in] samr_CryptPassword *nt_password,
1082 [in] samr_Password *nt_verifier,
1083 [in] bool8 lm_change,
1084 [in] samr_CryptPassword *lm_password,
1085 [in] samr_Password *lm_verifier
1088 /************************/
1090 NTSTATUS samr_GetDomPwInfo(
1091 [in] samr_String *domain_name,
1092 [out] samr_PwInfo info
1095 /************************/
1097 NTSTATUS samr_Connect2(
1098 [in] unistr *system_name,
1099 [in] uint32 access_mask,
1100 [out,ref] policy_handle *connect_handle
1103 /************************/
1106 seems to be an exact alias for samr_SetUserInfo()
1108 NTSTATUS samr_SetUserInfo2(
1109 [in,ref] policy_handle *user_handle,
1111 [in,ref,switch_is(level)] samr_UserInfo *info
1114 /************************/
1117 this one is mysterious. I have a few guesses, but nothing working yet
1119 NTSTATUS samr_SetBootKeyInformation(
1120 [in,ref] policy_handle *connect_handle,
1121 [in] uint32 unknown1,
1122 [in] uint32 unknown2,
1123 [in] uint32 unknown3
1126 /************************/
1128 NTSTATUS samr_GetBootKeyInformation(
1129 [in,ref] policy_handle *domain_handle,
1130 [out] uint32 unknown
1133 /************************/
1135 NTSTATUS samr_Connect3(
1136 [in] unistr *system_name,
1137 /* this unknown value seems to be completely ignored by w2k3 */
1138 [in] uint32 unknown,
1139 [in] uint32 access_mask,
1140 [out,ref] policy_handle *connect_handle
1143 /************************/
1145 NTSTATUS samr_Connect4(
1146 [in] unistr *system_name,
1147 [in] uint32 unknown,
1148 [in] uint32 access_mask,
1149 [out,ref] policy_handle *connect_handle
1152 /************************/
1155 typedef [v1_enum] enum {
1156 SAMR_REJECT_OTHER = 0,
1157 SAMR_REJECT_TOO_SHORT = 1,
1158 SAMR_REJECT_COMPLEXITY = 2
1159 } samr_RejectReason;
1162 samr_RejectReason reason;
1165 } samr_ChangeReject;
1167 NTSTATUS samr_ChangePasswordUser3(
1168 [in] samr_String *server,
1169 [in,ref] samr_String *account,
1170 [in] samr_CryptPassword *nt_password,
1171 [in] samr_Password *nt_verifier,
1172 [in] bool8 lm_change,
1173 [in] samr_CryptPassword *lm_password,
1174 [in] samr_Password *lm_verifier,
1175 [in] samr_CryptPassword *password3,
1176 [out] samr_DomInfo1 *dominfo,
1177 [out] samr_ChangeReject *reject
1180 /************************/
1184 uint32 unknown1; /* w2k3 gives 3 */
1185 uint32 unknown2; /* w2k3 gives 0 */
1186 } samr_ConnectInfo1;
1189 [case(1)] samr_ConnectInfo1 info1;
1192 NTSTATUS samr_Connect5(
1193 [in] unistr *system_name,
1194 [in] uint32 access_mask,
1195 [in,out] uint32 level,
1196 [in,out,switch_is(level),ref] samr_ConnectInfo *info,
1197 [out,ref] policy_handle *connect_handle
1200 /************************/
1202 NTSTATUS samr_RidToSid(
1203 [in,ref] policy_handle *domain_handle,
1209 /************************/
1213 this should set the DSRM password for the server, which is used
1214 when booting into Directory Services Recovery Mode on a DC. Win2003
1215 gives me NT_STATUS_NOT_SUPPORTED
1218 NTSTATUS samr_SetDsrmPassword(
1219 [in] samr_String *name,
1220 [in] uint32 unknown,
1221 [in] samr_Password *hash
1225 /************************/
1228 I haven't been able to work out the format of this one yet.
1229 Seems to start with a switch level for a union?
1231 NTSTATUS samr_ValidatePassword();