summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/utils/net_proto.h1
-rw-r--r--source3/utils/net_rpc.c8
-rw-r--r--source3/utils/net_rpc_samsync.c13
3 files changed, 22 insertions, 0 deletions
diff --git a/source3/utils/net_proto.h b/source3/utils/net_proto.h
index 128f88b0d3..c058a0166f 100644
--- a/source3/utils/net_proto.h
+++ b/source3/utils/net_proto.h
@@ -359,6 +359,7 @@ NTSTATUS rpc_vampire_internals(struct net_context *c,
TALLOC_CTX *mem_ctx,
int argc,
const char **argv);
+int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv);
int rpc_vampire_ldif(struct net_context *c, int argc, const char **argv);
NTSTATUS rpc_vampire_ldif_internals(struct net_context *c,
const DOM_SID *domain_sid,
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 10f2a324a3..8c79cea021 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -6370,6 +6370,14 @@ static int rpc_vampire(struct net_context *c, int argc, const char **argv)
"net rpc vampire keytab\n"
" Dump remote SAM database to Kerberos keytab file"
},
+ {
+ "passdb",
+ rpc_vampire_passdb,
+ NET_TRANSPORT_RPC,
+ "Dump remote SAM database to passdb",
+ "net rpc vampire passdb\n"
+ " Dump remote SAM database to passdb"
+ },
{NULL, NULL, 0, NULL, NULL}
};
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index 22c6d25402..3b97718634 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -248,6 +248,19 @@ NTSTATUS rpc_vampire_internals(struct net_context *c,
return result;
}
+int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv)
+{
+ if (c->display_usage) {
+ d_printf("Usage:\n"
+ "net rpc vampire passdb\n"
+ " Dump remote SAM database to passdb\n");
+ return 0;
+ }
+
+ return run_rpc_command(c, NULL, &ndr_table_netlogon.syntax_id, 0,
+ rpc_vampire_internals, argc, argv);
+}
+
NTSTATUS rpc_vampire_ldif_internals(struct net_context *c,
const DOM_SID *domain_sid,
const char *domain_name,