2 Unix SMB/CIFS implementation.
5 Copyright (C) Tim Potter 2000
6 Copyright (C) Guenther Deschner 2008
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "rpcclient.h"
25 static WERROR
cmd_netlogon_logon_ctrl2(struct rpc_pipe_client
*cli
,
26 TALLOC_CTX
*mem_ctx
, int argc
,
29 NTSTATUS status
= NT_STATUS_UNSUCCESSFUL
;
31 const char *logon_server
= cli
->desthost
;
32 enum netr_LogonControlCode function_code
= NETLOGON_CONTROL_REDISCOVER
;
34 union netr_CONTROL_DATA_INFORMATION data
;
35 union netr_CONTROL_QUERY_INFORMATION query
;
36 const char *domain
= lp_workgroup();
39 fprintf(stderr
, "Usage: %s <logon_server> <function_code> "
40 "<level> <domain>\n", argv
[0]);
45 logon_server
= argv
[1];
49 function_code
= atoi(argv
[2]);
53 level
= atoi(argv
[3]);
60 switch (function_code
) {
61 case NETLOGON_CONTROL_REDISCOVER
:
62 case NETLOGON_CONTROL_TC_QUERY
:
69 status
= rpccli_netr_LogonControl2(cli
, mem_ctx
,
76 if (!NT_STATUS_IS_OK(status
)) {
77 return ntstatus_to_werror(status
);
80 if (!W_ERROR_IS_OK(werr
)) {
89 static WERROR
cmd_netlogon_getanydcname(struct rpc_pipe_client
*cli
,
90 TALLOC_CTX
*mem_ctx
, int argc
,
93 const char *dcname
= NULL
;
99 fprintf(stderr
, "Usage: %s domainname\n", argv
[0]);
103 /* Make sure to wait for our DC's reply */
104 old_timeout
= rpccli_set_timeout(cli
, 30000); /* 30 seconds. */
105 rpccli_set_timeout(cli
, MAX(old_timeout
, 30000)); /* At least 30 sec */
107 status
= rpccli_netr_GetAnyDCName(cli
, mem_ctx
,
112 rpccli_set_timeout(cli
, old_timeout
);
114 if (!NT_STATUS_IS_OK(status
)) {
115 return ntstatus_to_werror(status
);
118 if (!W_ERROR_IS_OK(werr
)) {
122 /* Display results */
124 printf("%s\n", dcname
);
129 static WERROR
cmd_netlogon_getdcname(struct rpc_pipe_client
*cli
,
130 TALLOC_CTX
*mem_ctx
, int argc
,
133 const char *dcname
= NULL
;
139 fprintf(stderr
, "Usage: %s domainname\n", argv
[0]);
143 /* Make sure to wait for our DC's reply */
144 old_timeout
= rpccli_set_timeout(cli
, 30000); /* 30 seconds. */
145 rpccli_set_timeout(cli
, MAX(30000, old_timeout
)); /* At least 30 sec */
147 status
= rpccli_netr_GetDcName(cli
, mem_ctx
,
152 rpccli_set_timeout(cli
, old_timeout
);
154 if (!NT_STATUS_IS_OK(status
)) {
155 return ntstatus_to_werror(status
);
158 if (!W_ERROR_IS_OK(werr
)) {
162 /* Display results */
164 printf("%s\n", dcname
);
169 static WERROR
cmd_netlogon_dsr_getdcname(struct rpc_pipe_client
*cli
,
170 TALLOC_CTX
*mem_ctx
, int argc
,
174 WERROR werr
= WERR_OK
;
175 uint32 flags
= DS_RETURN_DNS_NAME
;
176 const char *server_name
= cli
->desthost
;
177 const char *domain_name
;
178 struct GUID domain_guid
= GUID_zero();
179 struct GUID site_guid
= GUID_zero();
180 struct netr_DsRGetDCNameInfo
*info
= NULL
;
183 fprintf(stderr
, "Usage: %s [domain_name] [domain_guid] "
184 "[site_guid] [flags]\n", argv
[0]);
189 domain_name
= argv
[1];
192 if (!NT_STATUS_IS_OK(GUID_from_string(argv
[2], &domain_guid
))) {
198 if (!NT_STATUS_IS_OK(GUID_from_string(argv
[3], &site_guid
))) {
204 sscanf(argv
[4], "%x", &flags
);
206 debug_dsdcinfo_flags(1,flags
);
208 result
= rpccli_netr_DsRGetDCName(cli
, mem_ctx
,
217 if (W_ERROR_IS_OK(werr
)) {
218 d_printf("DsGetDcName gave: %s\n",
219 NDR_PRINT_STRUCT_STRING(mem_ctx
, netr_DsRGetDCNameInfo
, info
));
223 printf("rpccli_netlogon_dsr_getdcname returned %s\n",
229 static WERROR
cmd_netlogon_dsr_getdcnameex(struct rpc_pipe_client
*cli
,
230 TALLOC_CTX
*mem_ctx
, int argc
,
235 uint32_t flags
= DS_RETURN_DNS_NAME
;
236 const char *server_name
= cli
->desthost
;
237 const char *domain_name
;
238 const char *site_name
= NULL
;
239 struct GUID domain_guid
= GUID_zero();
240 struct netr_DsRGetDCNameInfo
*info
= NULL
;
243 fprintf(stderr
, "Usage: %s [domain_name] [domain_guid] "
244 "[site_name] [flags]\n", argv
[0]);
248 domain_name
= argv
[1];
251 if (!NT_STATUS_IS_OK(GUID_from_string(argv
[2], &domain_guid
))) {
261 sscanf(argv
[4], "%x", &flags
);
264 debug_dsdcinfo_flags(1,flags
);
266 status
= rpccli_netr_DsRGetDCNameEx(cli
, mem_ctx
,
274 if (!NT_STATUS_IS_OK(status
)) {
275 return ntstatus_to_werror(status
);
278 if (!W_ERROR_IS_OK(result
)) {
282 d_printf("DsRGetDCNameEx gave %s\n",
283 NDR_PRINT_STRUCT_STRING(mem_ctx
, netr_DsRGetDCNameInfo
, info
));
288 static WERROR
cmd_netlogon_dsr_getdcnameex2(struct rpc_pipe_client
*cli
,
289 TALLOC_CTX
*mem_ctx
, int argc
,
294 uint32_t flags
= DS_RETURN_DNS_NAME
;
295 const char *server_name
= cli
->desthost
;
296 const char *domain_name
= NULL
;
297 const char *client_account
= NULL
;
299 const char *site_name
= NULL
;
300 struct GUID domain_guid
= GUID_zero();
301 struct netr_DsRGetDCNameInfo
*info
= NULL
;
304 fprintf(stderr
, "Usage: %s [client_account] [acb_mask] "
305 "[domain_name] [domain_guid] [site_name] "
306 "[flags]\n", argv
[0]);
311 client_account
= argv
[1];
315 mask
= atoi(argv
[2]);
319 domain_name
= argv
[3];
323 if (!NT_STATUS_IS_OK(GUID_from_string(argv
[4], &domain_guid
))) {
333 sscanf(argv
[6], "%x", &flags
);
336 debug_dsdcinfo_flags(1,flags
);
338 status
= rpccli_netr_DsRGetDCNameEx2(cli
, mem_ctx
,
348 if (!NT_STATUS_IS_OK(status
)) {
349 return ntstatus_to_werror(status
);
352 if (!W_ERROR_IS_OK(result
)) {
356 d_printf("DsRGetDCNameEx2 gave %s\n",
357 NDR_PRINT_STRUCT_STRING(mem_ctx
, netr_DsRGetDCNameInfo
, info
));
363 static WERROR
cmd_netlogon_dsr_getsitename(struct rpc_pipe_client
*cli
,
364 TALLOC_CTX
*mem_ctx
, int argc
,
369 const char *sitename
= NULL
;
372 fprintf(stderr
, "Usage: %s computername\n", argv
[0]);
376 status
= rpccli_netr_DsRGetSiteName(cli
, mem_ctx
,
380 if (!NT_STATUS_IS_OK(status
)) {
381 return ntstatus_to_werror(status
);
384 if (!W_ERROR_IS_OK(werr
)) {
385 printf("rpccli_netlogon_dsr_gesitename returned %s\n",
386 nt_errstr(werror_to_ntstatus(werr
)));
390 printf("Computer %s is on Site: %s\n", argv
[1], sitename
);
395 static WERROR
cmd_netlogon_logon_ctrl(struct rpc_pipe_client
*cli
,
396 TALLOC_CTX
*mem_ctx
, int argc
,
399 NTSTATUS status
= NT_STATUS_UNSUCCESSFUL
;
401 const char *logon_server
= cli
->desthost
;
402 enum netr_LogonControlCode function_code
= 1;
404 union netr_CONTROL_QUERY_INFORMATION info
;
407 fprintf(stderr
, "Usage: %s <logon_server> <function_code> "
408 "<level>\n", argv
[0]);
413 logon_server
= argv
[1];
417 function_code
= atoi(argv
[2]);
421 level
= atoi(argv
[3]);
424 status
= rpccli_netr_LogonControl(cli
, mem_ctx
,
430 if (!NT_STATUS_IS_OK(status
)) {
431 return ntstatus_to_werror(status
);
434 if (!W_ERROR_IS_OK(werr
)) {
438 /* Display results */
443 /* Display sam synchronisation information */
445 static void display_sam_sync(struct netr_DELTA_ENUM_ARRAY
*r
)
449 for (i
=0; i
< r
->num_deltas
; i
++) {
451 union netr_DELTA_UNION u
= r
->delta_enum
[i
].delta_union
;
452 union netr_DELTA_ID_UNION id
= r
->delta_enum
[i
].delta_id_union
;
454 switch (r
->delta_enum
[i
].delta_type
) {
455 case NETR_DELTA_DOMAIN
:
456 printf("Domain: %s\n",
457 u
.domain
->domain_name
.string
);
459 case NETR_DELTA_GROUP
:
460 printf("Group: %s\n",
461 u
.group
->group_name
.string
);
463 case NETR_DELTA_DELETE_GROUP
:
464 printf("Delete Group: %d\n",
465 u
.delete_account
.unknown
);
467 case NETR_DELTA_RENAME_GROUP
:
468 printf("Rename Group: %s -> %s\n",
469 u
.rename_group
->OldName
.string
,
470 u
.rename_group
->NewName
.string
);
472 case NETR_DELTA_USER
:
473 printf("Account: %s\n",
474 u
.user
->account_name
.string
);
476 case NETR_DELTA_DELETE_USER
:
477 printf("Delete User: %d\n",
480 case NETR_DELTA_RENAME_USER
:
481 printf("Rename user: %s -> %s\n",
482 u
.rename_user
->OldName
.string
,
483 u
.rename_user
->NewName
.string
);
485 case NETR_DELTA_GROUP_MEMBER
:
486 for (j
=0; j
< u
.group_member
->num_rids
; j
++) {
487 printf("rid 0x%x, attrib 0x%08x\n",
488 u
.group_member
->rids
[j
],
489 u
.group_member
->attribs
[j
]);
492 case NETR_DELTA_ALIAS
:
493 printf("Alias: %s\n",
494 u
.alias
->alias_name
.string
);
496 case NETR_DELTA_DELETE_ALIAS
:
497 printf("Delete Alias: %d\n",
498 r
->delta_enum
[i
].delta_id_union
.rid
);
500 case NETR_DELTA_RENAME_ALIAS
:
501 printf("Rename alias: %s -> %s\n",
502 u
.rename_alias
->OldName
.string
,
503 u
.rename_alias
->NewName
.string
);
505 case NETR_DELTA_ALIAS_MEMBER
:
506 for (j
=0; j
< u
.alias_member
->sids
.num_sids
; j
++) {
508 sid_to_fstring(sid_str
,
509 u
.alias_member
->sids
.sids
[j
].sid
);
510 printf("%s\n", sid_str
);
513 case NETR_DELTA_POLICY
:
516 case NETR_DELTA_TRUSTED_DOMAIN
:
517 printf("Trusted Domain: %s\n",
518 u
.trusted_domain
->domain_name
.string
);
520 case NETR_DELTA_DELETE_TRUST
:
521 printf("Delete Trust: %d\n",
522 u
.delete_trust
.unknown
);
524 case NETR_DELTA_ACCOUNT
:
527 case NETR_DELTA_DELETE_ACCOUNT
:
528 printf("Delete Account: %d\n",
529 u
.delete_account
.unknown
);
531 case NETR_DELTA_SECRET
:
534 case NETR_DELTA_DELETE_SECRET
:
535 printf("Delete Secret: %d\n",
536 u
.delete_secret
.unknown
);
538 case NETR_DELTA_DELETE_GROUP2
:
539 printf("Delete Group2: %s\n",
540 u
.delete_group
->account_name
);
542 case NETR_DELTA_DELETE_USER2
:
543 printf("Delete User2: %s\n",
544 u
.delete_user
->account_name
);
546 case NETR_DELTA_MODIFY_COUNT
:
547 printf("sam sequence update: 0x%016llx\n",
548 (unsigned long long) *u
.modified_count
);
551 printf("unknown delta type 0x%02x\n",
552 r
->delta_enum
[i
].delta_type
);
558 /* Perform sam synchronisation */
560 static NTSTATUS
cmd_netlogon_sam_sync(struct rpc_pipe_client
*cli
,
561 TALLOC_CTX
*mem_ctx
, int argc
,
564 NTSTATUS result
= NT_STATUS_UNSUCCESSFUL
;
565 const char *logon_server
= cli
->desthost
;
566 const char *computername
= global_myname();
567 struct netr_Authenticator credential
;
568 struct netr_Authenticator return_authenticator
;
569 enum netr_SamDatabaseID database_id
= SAM_DATABASE_DOMAIN
;
570 uint16_t restart_state
= 0;
571 uint32_t sync_context
= 0;
574 fprintf(stderr
, "Usage: %s [database_id]\n", argv
[0]);
579 database_id
= atoi(argv
[1]);
582 /* Synchronise sam database */
585 struct netr_DELTA_ENUM_ARRAY
*delta_enum_array
= NULL
;
587 netlogon_creds_client_step(cli
->dc
, &credential
);
589 result
= rpccli_netr_DatabaseSync2(cli
, mem_ctx
,
593 &return_authenticator
,
600 /* Check returned credentials. */
601 if (!netlogon_creds_client_check(cli
->dc
,
602 &return_authenticator
.cred
)) {
603 DEBUG(0,("credentials chain check failed\n"));
604 return NT_STATUS_ACCESS_DENIED
;
607 if (NT_STATUS_IS_ERR(result
)) {
611 /* Display results */
613 display_sam_sync(delta_enum_array
);
615 TALLOC_FREE(delta_enum_array
);
617 } while (NT_STATUS_EQUAL(result
, STATUS_MORE_ENTRIES
));
622 /* Perform sam delta synchronisation */
624 static NTSTATUS
cmd_netlogon_sam_deltas(struct rpc_pipe_client
*cli
,
625 TALLOC_CTX
*mem_ctx
, int argc
,
628 NTSTATUS result
= NT_STATUS_UNSUCCESSFUL
;
630 const char *logon_server
= cli
->desthost
;
631 const char *computername
= global_myname();
632 struct netr_Authenticator credential
;
633 struct netr_Authenticator return_authenticator
;
634 enum netr_SamDatabaseID database_id
= SAM_DATABASE_DOMAIN
;
635 uint64_t sequence_num
;
638 fprintf(stderr
, "Usage: %s database_id seqnum\n", argv
[0]);
642 database_id
= atoi(argv
[1]);
645 sequence_num
= tmp
& 0xffff;
648 struct netr_DELTA_ENUM_ARRAY
*delta_enum_array
= NULL
;
650 netlogon_creds_client_step(cli
->dc
, &credential
);
652 result
= rpccli_netr_DatabaseDeltas(cli
, mem_ctx
,
656 &return_authenticator
,
662 /* Check returned credentials. */
663 if (!netlogon_creds_client_check(cli
->dc
,
664 &return_authenticator
.cred
)) {
665 DEBUG(0,("credentials chain check failed\n"));
666 return NT_STATUS_ACCESS_DENIED
;
669 if (NT_STATUS_IS_ERR(result
)) {
673 /* Display results */
675 display_sam_sync(delta_enum_array
);
677 TALLOC_FREE(delta_enum_array
);
679 } while (NT_STATUS_EQUAL(result
, STATUS_MORE_ENTRIES
));
684 /* Log on a domain user */
686 static NTSTATUS
cmd_netlogon_sam_logon(struct rpc_pipe_client
*cli
,
687 TALLOC_CTX
*mem_ctx
, int argc
,
690 NTSTATUS result
= NT_STATUS_UNSUCCESSFUL
;
691 int logon_type
= NET_LOGON_TYPE
;
692 const char *username
, *password
;
694 uint32 logon_param
= 0;
695 const char *workstation
= NULL
;
697 /* Check arguments */
699 if (argc
< 3 || argc
> 7) {
700 fprintf(stderr
, "Usage: samlogon <username> <password> [workstation]"
701 "[logon_type (1 or 2)] [auth level (2 or 3)] [logon_parameter]\n");
709 workstation
= argv
[3];
712 sscanf(argv
[4], "%i", &logon_type
);
715 sscanf(argv
[5], "%i", &auth_level
);
718 sscanf(argv
[6], "%x", &logon_param
);
720 /* Perform the sam logon */
722 result
= rpccli_netlogon_sam_logon(cli
, mem_ctx
, logon_param
, lp_workgroup(), username
, password
, workstation
, logon_type
);
724 if (!NT_STATUS_IS_OK(result
))
731 /* Change the trust account password */
733 static NTSTATUS
cmd_netlogon_change_trust_pw(struct rpc_pipe_client
*cli
,
734 TALLOC_CTX
*mem_ctx
, int argc
,
737 NTSTATUS result
= NT_STATUS_UNSUCCESSFUL
;
739 /* Check arguments */
742 fprintf(stderr
, "Usage: change_trust_pw");
746 /* Perform the sam logon */
748 result
= trust_pw_find_change_and_store_it(cli
, mem_ctx
,
751 if (!NT_STATUS_IS_OK(result
))
758 static WERROR
cmd_netlogon_gettrustrid(struct rpc_pipe_client
*cli
,
759 TALLOC_CTX
*mem_ctx
, int argc
,
762 NTSTATUS status
= NT_STATUS_UNSUCCESSFUL
;
763 WERROR werr
= WERR_GENERAL_FAILURE
;
764 const char *server_name
= cli
->desthost
;
765 const char *domain_name
= lp_workgroup();
768 if (argc
< 1 || argc
> 3) {
769 fprintf(stderr
, "Usage: %s <server_name> <domain_name>\n",
775 server_name
= argv
[1];
779 domain_name
= argv
[2];
782 status
= rpccli_netr_LogonGetTrustRid(cli
, mem_ctx
,
787 if (!NT_STATUS_IS_OK(status
)) {
791 if (W_ERROR_IS_OK(werr
)) {
792 printf("Rid: %d\n", rid
);
798 static WERROR
cmd_netlogon_dsr_enumtrustdom(struct rpc_pipe_client
*cli
,
799 TALLOC_CTX
*mem_ctx
, int argc
,
802 NTSTATUS status
= NT_STATUS_UNSUCCESSFUL
;
803 WERROR werr
= WERR_GENERAL_FAILURE
;
804 const char *server_name
= cli
->desthost
;
805 uint32_t trust_flags
= NETR_TRUST_FLAG_IN_FOREST
;
806 struct netr_DomainTrustList trusts
;
808 if (argc
< 1 || argc
> 3) {
809 fprintf(stderr
, "Usage: %s <server_name> <trust_flags>\n",
815 server_name
= argv
[1];
819 sscanf(argv
[2], "%x", &trust_flags
);
822 status
= rpccli_netr_DsrEnumerateDomainTrusts(cli
, mem_ctx
,
827 if (!NT_STATUS_IS_OK(status
)) {
831 if (W_ERROR_IS_OK(werr
)) {
834 printf("%d domains returned\n", trusts
.count
);
836 for (i
=0; i
<trusts
.count
; i
++ ) {
838 trusts
.array
[i
].dns_name
,
839 trusts
.array
[i
].netbios_name
);
846 static WERROR
cmd_netlogon_deregisterdnsrecords(struct rpc_pipe_client
*cli
,
847 TALLOC_CTX
*mem_ctx
, int argc
,
850 NTSTATUS status
= NT_STATUS_UNSUCCESSFUL
;
851 WERROR werr
= WERR_GENERAL_FAILURE
;
852 const char *server_name
= cli
->desthost
;
853 const char *domain
= lp_workgroup();
854 const char *dns_host
= NULL
;
856 if (argc
< 1 || argc
> 4) {
857 fprintf(stderr
, "Usage: %s <server_name> <domain_name> "
858 "<dns_host>\n", argv
[0]);
863 server_name
= argv
[1];
874 status
= rpccli_netr_DsrDeregisterDNSHostRecords(cli
, mem_ctx
,
881 if (!NT_STATUS_IS_OK(status
)) {
885 if (W_ERROR_IS_OK(werr
)) {
892 static WERROR
cmd_netlogon_dsr_getforesttrustinfo(struct rpc_pipe_client
*cli
,
893 TALLOC_CTX
*mem_ctx
, int argc
,
896 NTSTATUS status
= NT_STATUS_UNSUCCESSFUL
;
897 WERROR werr
= WERR_GENERAL_FAILURE
;
898 const char *server_name
= cli
->desthost
;
899 const char *trusted_domain_name
= NULL
;
900 struct lsa_ForestTrustInformation
*info
= NULL
;
903 if (argc
< 1 || argc
> 4) {
904 fprintf(stderr
, "Usage: %s <server_name> <trusted_domain_name> "
905 "<flags>\n", argv
[0]);
910 server_name
= argv
[1];
914 trusted_domain_name
= argv
[2];
918 sscanf(argv
[3], "%x", &flags
);
921 status
= rpccli_netr_DsRGetForestTrustInformation(cli
, mem_ctx
,
927 if (!NT_STATUS_IS_OK(status
)) {
931 if (W_ERROR_IS_OK(werr
)) {
938 static WERROR
cmd_netlogon_enumtrusteddomains(struct rpc_pipe_client
*cli
,
939 TALLOC_CTX
*mem_ctx
, int argc
,
942 NTSTATUS status
= NT_STATUS_UNSUCCESSFUL
;
943 WERROR werr
= WERR_GENERAL_FAILURE
;
944 const char *server_name
= cli
->desthost
;
945 struct netr_Blob blob
;
948 if (argc
< 1 || argc
> 3) {
949 fprintf(stderr
, "Usage: %s <server_name>\n", argv
[0]);
954 server_name
= argv
[1];
957 status
= rpccli_netr_NetrEnumerateTrustedDomains(cli
, mem_ctx
,
961 if (!NT_STATUS_IS_OK(status
)) {
965 if (W_ERROR_IS_OK(werr
)) {
967 dump_data(1, blob
.data
, blob
.length
);
973 static WERROR
cmd_netlogon_enumtrusteddomainsex(struct rpc_pipe_client
*cli
,
974 TALLOC_CTX
*mem_ctx
, int argc
,
977 NTSTATUS status
= NT_STATUS_UNSUCCESSFUL
;
978 WERROR werr
= WERR_GENERAL_FAILURE
;
979 const char *server_name
= cli
->desthost
;
980 struct netr_DomainTrustList list
;
982 if (argc
< 1 || argc
> 3) {
983 fprintf(stderr
, "Usage: %s <server_name>\n", argv
[0]);
988 server_name
= argv
[1];
991 status
= rpccli_netr_NetrEnumerateTrustedDomainsEx(cli
, mem_ctx
,
995 if (!NT_STATUS_IS_OK(status
)) {
999 if (W_ERROR_IS_OK(werr
)) {
1000 printf("success\n");
1007 /* List of commands exported by this module */
1009 struct cmd_set netlogon_commands
[] = {
1013 { "logonctrl2", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_logon_ctrl2
, PI_NETLOGON
, NULL
, "Logon Control 2", "" },
1014 { "getanydcname", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_getanydcname
, PI_NETLOGON
, NULL
, "Get trusted DC name", "" },
1015 { "getdcname", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_getdcname
, PI_NETLOGON
, NULL
, "Get trusted PDC name", "" },
1016 { "dsr_getdcname", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_dsr_getdcname
, PI_NETLOGON
, NULL
, "Get trusted DC name", "" },
1017 { "dsr_getdcnameex", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_dsr_getdcnameex
, PI_NETLOGON
, NULL
, "Get trusted DC name", "" },
1018 { "dsr_getdcnameex2", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_dsr_getdcnameex2
, PI_NETLOGON
, NULL
, "Get trusted DC name", "" },
1019 { "dsr_getsitename", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_dsr_getsitename
, PI_NETLOGON
, NULL
, "Get sitename", "" },
1020 { "dsr_getforesttrustinfo", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_dsr_getforesttrustinfo
, PI_NETLOGON
, NULL
, "Get Forest Trust Info", "" },
1021 { "logonctrl", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_logon_ctrl
, PI_NETLOGON
, NULL
, "Logon Control", "" },
1022 { "samsync", RPC_RTYPE_NTSTATUS
, cmd_netlogon_sam_sync
, NULL
, PI_NETLOGON
, NULL
, "Sam Synchronisation", "" },
1023 { "samdeltas", RPC_RTYPE_NTSTATUS
, cmd_netlogon_sam_deltas
, NULL
, PI_NETLOGON
, NULL
, "Query Sam Deltas", "" },
1024 { "samlogon", RPC_RTYPE_NTSTATUS
, cmd_netlogon_sam_logon
, NULL
, PI_NETLOGON
, NULL
, "Sam Logon", "" },
1025 { "change_trust_pw", RPC_RTYPE_NTSTATUS
, cmd_netlogon_change_trust_pw
, NULL
, PI_NETLOGON
, NULL
, "Change Trust Account Password", "" },
1026 { "gettrustrid", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_gettrustrid
, PI_NETLOGON
, NULL
, "Get trust rid", "" },
1027 { "dsr_enumtrustdom", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_dsr_enumtrustdom
, PI_NETLOGON
, NULL
, "Enumerate trusted domains", "" },
1028 { "dsenumdomtrusts", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_dsr_enumtrustdom
, PI_NETLOGON
, NULL
, "Enumerate all trusted domains in an AD forest", "" },
1029 { "deregisterdnsrecords", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_deregisterdnsrecords
, PI_NETLOGON
, NULL
, "Deregister DNS records", "" },
1030 { "netrenumtrusteddomains", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_enumtrusteddomains
, PI_NETLOGON
, NULL
, "Enumerate trusted domains", "" },
1031 { "netrenumtrusteddomainsex", RPC_RTYPE_WERROR
, NULL
, cmd_netlogon_enumtrusteddomainsex
, PI_NETLOGON
, NULL
, "Enumerate trusted domains", "" },