s4 net: rename to samba-tool in order to not clash with s3 net
authorKai Blin <kai@samba.org>
Sun, 24 Oct 2010 02:27:26 +0000 (19:27 -0700)
committerKai Blin <kai@samba.org>
Thu, 28 Oct 2010 07:25:16 +0000 (07:25 +0000)
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Thu Oct 28 07:25:16 UTC 2010 on sn-devel-104

30 files changed:
selftest/target/Samba4.pm
source4/samba_tool/drs/drs.c [moved from source4/utils/net/drs/net_drs.c with 97% similarity]
source4/samba_tool/drs/drs.h [moved from source4/utils/net/drs/net_drs.h with 94% similarity]
source4/samba_tool/drs/drs_bind.c [moved from source4/utils/net/drs/net_drs_bind.c with 98% similarity]
source4/samba_tool/drs/drs_kcc.c [moved from source4/utils/net/drs/net_drs_kcc.c with 96% similarity]
source4/samba_tool/drs/drs_replicate.c [moved from source4/utils/net/drs/net_drs_replicate.c with 96% similarity]
source4/samba_tool/drs/drs_showrepl.c [moved from source4/utils/net/drs/net_drs_showrepl.c with 98% similarity]
source4/samba_tool/gpo.c [moved from source4/utils/net/net_gpo.c with 89% similarity]
source4/samba_tool/password.c [moved from source4/utils/net/net_password.c with 92% similarity]
source4/samba_tool/samba_tool.c [moved from source4/utils/net/net.c with 95% similarity]
source4/samba_tool/samba_tool.h [moved from source4/utils/net/net.h with 83% similarity]
source4/samba_tool/vampire.c [moved from source4/utils/net/net_vampire.c with 89% similarity]
source4/samba_tool/wscript_build [new file with mode: 0644]
source4/selftest/skip
source4/selftest/tests.py
source4/setup/tests/blackbox_group.sh
source4/setup/tests/blackbox_newuser.sh
source4/setup/tests/blackbox_setpassword.sh
source4/setup/tests/blackbox_spn.sh
source4/torture/drs/python/delete_object.py
source4/torture/drs/python/fsmo.py
source4/utils/net/config.mk [deleted file]
source4/utils/net/wscript_build [deleted file]
source4/utils/tests/test_samba_tool.sh [moved from source4/utils/tests/test_net.sh with 70% similarity]
source4/wscript_build
testprogs/blackbox/test_export_keytab.sh
testprogs/blackbox/test_kinit.sh
testprogs/blackbox/test_ktpass.sh
testprogs/blackbox/test_passwords.sh
testprogs/blackbox/test_pkinit.sh

index ba96f08d0d1b74380a2f4eb8bf7a793e745689d5..168fe4262037ac942209c55e359f1dae65b551c3 100644 (file)
@@ -880,11 +880,11 @@ sub provision_member($$$)
                return undef;
        }
 
-       my $net = $self->bindir_path("net");
+       my $samba_tool = $self->bindir_path("samba-tool");
        my $cmd = "";
        $cmd .= "SOCKET_WRAPPER_DEFAULT_IFACE=\"$ret->{SOCKET_WRAPPER_DEFAULT_IFACE}\" ";
        $cmd .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
-       $cmd .= "$net join $ret->{CONFIGURATION} $dcvars->{REALM} member";
+       $cmd .= "$samba_tool join $ret->{CONFIGURATION} $dcvars->{REALM} member";
        $cmd .= " -U$dcvars->{DC_USERNAME}\%$dcvars->{DC_PASSWORD}";
 
        unless (system($cmd) == 0) {
@@ -935,11 +935,11 @@ sub provision_rpc_proxy($$$)
                return undef;
        }
 
-       my $net = $self->bindir_path("net");
+       my $samba_tool = $self->bindir_path("samba-tool");
        my $cmd = "";
        $cmd .= "SOCKET_WRAPPER_DEFAULT_IFACE=\"$ret->{SOCKET_WRAPPER_DEFAULT_IFACE}\" ";
        $cmd .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
-       $cmd .= "$net join $ret->{CONFIGURATION} $dcvars->{REALM} member";
+       $cmd .= "$samba_tool join $ret->{CONFIGURATION} $dcvars->{REALM} member";
        $cmd .= " -U$dcvars->{DC_USERNAME}\%$dcvars->{DC_PASSWORD}";
 
        unless (system($cmd) == 0) {
@@ -991,11 +991,11 @@ sub provision_vampire_dc($$$)
                return undef;
        }
 
-       my $net = $self->bindir_path("net");
+       my $samba_tool = $self->bindir_path("samba-tool");
        my $cmd = "";
        $cmd .= "SOCKET_WRAPPER_DEFAULT_IFACE=\"$ret->{SOCKET_WRAPPER_DEFAULT_IFACE}\" ";
        $cmd .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
-       $cmd .= "$net vampire $ret->{CONFIGURATION} $dcvars->{REALM} --realm=$dcvars->{REALM}";
+       $cmd .= "$samba_tool vampire $ret->{CONFIGURATION} $dcvars->{REALM} --realm=$dcvars->{REALM}";
        $cmd .= " -U$dcvars->{DC_USERNAME}\%$dcvars->{DC_PASSWORD}";
 
        unless (system($cmd) == 0) {
@@ -1169,11 +1169,11 @@ sub provision_rodc($$$)
                return undef;
        }
 
-       my $net = $self->bindir_path("net");
+       my $samba_tool = $self->bindir_path("samba-tool");
        my $cmd = "";
        $cmd .= "SOCKET_WRAPPER_DEFAULT_IFACE=\"$ret->{SOCKET_WRAPPER_DEFAULT_IFACE}\" ";
        $cmd .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
-       $cmd .= "$net join $ret->{CONFIGURATION} $dcvars->{REALM} RODC";
+       $cmd .= "$samba_tool join $ret->{CONFIGURATION} $dcvars->{REALM} RODC";
        $cmd .= " -U$dcvars->{DC_USERNAME}\%$dcvars->{DC_PASSWORD}";
        $cmd .= " --server=$dcvars->{DC_SERVER}";
 
@@ -1461,11 +1461,11 @@ sub setup_vampire_dc($$$)
 
        # force replicated DC to update repsTo/repsFrom
        # for vampired partitions
-       my $net = $self->bindir_path("net");
+       my $samba_tool = $self->bindir_path("samba-tool");
        my $cmd = "";
        $cmd .= "SOCKET_WRAPPER_DEFAULT_IFACE=\"$env->{SOCKET_WRAPPER_DEFAULT_IFACE}\"";
        $cmd .= " KRB5_CONFIG=\"$env->{KRB5_CONFIG}\"";
-       $cmd .= " $net drs kcc $env->{DC_SERVER}";
+       $cmd .= " $samba_tool drs kcc $env->{DC_SERVER}";
        $cmd .= " -U$dc_vars->{DC_USERNAME}\%$dc_vars->{DC_PASSWORD}";
        unless (system($cmd) == 0) {
                warn("Failed to exec kcc\n$cmd");
@@ -1477,7 +1477,7 @@ sub setup_vampire_dc($$$)
        my $base_dn = "DC=".join(",DC=", split(/\./, $dc_vars->{REALM}));
        $cmd = "SOCKET_WRAPPER_DEFAULT_IFACE=\"$env->{SOCKET_WRAPPER_DEFAULT_IFACE}\"";
        $cmd .= " KRB5_CONFIG=\"$env->{KRB5_CONFIG}\"";
-       $cmd .= " $net drs replicate $env->{DC_SERVER} $env->{VAMPIRE_DC_SERVER}";
+       $cmd .= " $samba_tool drs replicate $env->{DC_SERVER} $env->{VAMPIRE_DC_SERVER}";
        $cmd .= " -U$dc_vars->{DC_USERNAME}\%$dc_vars->{DC_PASSWORD}";
        # replicate Configuration NC
        my $cmd_repl = "$cmd \"CN=Configuration,$base_dn\"";
similarity index 97%
rename from source4/utils/net/drs/net_drs.c
rename to source4/samba_tool/drs/drs.c
index 578b6f2fc30333ab75d88675f769255382eb578e..78f8c144c288d931f0095592f8c8550e1dd07b27 100644 (file)
 */
 
 #include "includes.h"
-#include "utils/net/net.h"
+#include "samba_tool/samba_tool.h"
 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
-#include "utils/net/drs/net_drs.h"
+#include "samba_tool/drs/drs.h"
 #include "lib/ldb/include/ldb.h"
 #include "ldb_wrap.h"
 #include "system/filesys.h"
 
 
 /**
- * 'net drs' supported sub-commands
+ * 'samba-tool drs' supported sub-commands
  */
 static const struct net_functable net_drs_functable[] = {
        { "bind", "Display replication features for a domain controller\n", net_drs_bind_cmd, net_drs_bind_usage },
@@ -43,7 +43,7 @@ static const struct net_functable net_drs_functable[] = {
 };
 
 /**
- * 'net drs' entry point
+ * 'samba-tool drs' entry point
  */
 int net_drs(struct net_context *ctx, int argc, const char **argv)
 {
@@ -51,11 +51,11 @@ int net_drs(struct net_context *ctx, int argc, const char **argv)
 }
 
 /**
- * 'net drs' usage message
+ * 'samba-tool drs' usage message
  */
 int net_drs_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net drs <command> [options]\n");
+       d_printf("samba-tool drs <command> [options]\n");
        d_printf("\n");
        d_printf("Currently implemented commands:\n");
        d_printf("  bind      - Display DC replication features\n");
@@ -309,7 +309,7 @@ static int net_drs_context_destructor(struct net_drs_context *drs_ctx)
 
 /**
  * Create net_drs_context context to be used
- * by 'net drs' sub-commands
+ * by 'samba-tool drs' sub-commands
  */
 bool net_drs_create_context(struct net_context *net_ctx,
                            const char *dc_binding,
similarity index 94%
rename from source4/utils/net/drs/net_drs.h
rename to source4/samba_tool/drs/drs.h
index 310bb06cdefaffc0fc38d1d8c5815163d0c88731..1e4cccc5385d3023473957e9938cdb37506562f2 100644 (file)
@@ -19,8 +19,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifndef NET_DRS_H_
-#define NET_DRS_H_
+#ifndef SAMBA_TOOL_DRS_H_
+#define SAMBA_TOOL_DRS_H_
 
 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
 
@@ -82,6 +82,6 @@ struct net_drs_context {
 };
 
 
-#include "utils/net/drs/net_drs_proto.h"
+#include "samba_tool/drs/drs_proto.h"
 
-#endif /* NET_DRS_H_ */
+#endif /* SAMBA_TOOL_DRS_H_ */
similarity index 98%
rename from source4/utils/net/drs/net_drs_bind.c
rename to source4/samba_tool/drs/drs_bind.c
index 6daac7a60d823851865502092fd9dd2af9ea9285..cc2ad87df4b9957bdd433d7e1b2d660045b8c57a 100644 (file)
@@ -20,8 +20,8 @@
 */
 
 #include "includes.h"
-#include "utils/net/net.h"
-#include "utils/net/drs/net_drs.h"
+#include "samba_tool/samba_tool.h"
+#include "samba_tool/drs/drs.h"
 
 
 #define DEFINE_FLAG(_flag, _win_name) {_flag, #_flag, _win_name}
@@ -131,6 +131,6 @@ int net_drs_bind_cmd(struct net_context *ctx, int argc, const char **argv)
 
 int net_drs_bind_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net drs bind <DC_NAME>\n");
+       d_printf("samba-tool drs bind <DC_NAME>\n");
        return 0;
 }
similarity index 96%
rename from source4/utils/net/drs/net_drs_kcc.c
rename to source4/samba_tool/drs/drs_kcc.c
index eaf550e64d9b4f6e751066955af218d913de651f..fa8ea407dff8511b148995540ee946ea43ff08c6 100644 (file)
@@ -20,8 +20,8 @@
 */
 
 #include "includes.h"
-#include "utils/net/net.h"
-#include "utils/net/drs/net_drs.h"
+#include "samba_tool/samba_tool.h"
+#include "samba_tool/drs/drs.h"
 #include "lib/ldb/include/ldb.h"
 
 
@@ -91,7 +91,7 @@ failed:
 }
 
 /**
- * 'net drs kcc' command entry point
+ * 'samba-tool drs kcc' command entry point
  */
 int net_drs_kcc_cmd(struct net_context *ctx, int argc, const char **argv)
 {
@@ -161,10 +161,10 @@ failed:
 }
 
 /**
- * 'net drs kcc' usage
+ * 'samba-tool drs kcc' usage
  */
 int net_drs_kcc_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net drs kcc <DC_NAME>\n");
+       d_printf("samba-tool drs kcc <DC_NAME>\n");
        return 0;
 }
similarity index 96%
rename from source4/utils/net/drs/net_drs_replicate.c
rename to source4/samba_tool/drs/drs_replicate.c
index a661d2b70e4786f01d734bf5c1e0a011488f637f..36e0792e9589e27591d04a0e12676335fc08245e 100644 (file)
@@ -20,8 +20,8 @@
 */
 
 #include "includes.h"
-#include "utils/net/net.h"
-#include "net_drs.h"
+#include "samba_tool/samba_tool.h"
+#include "samba_tool/drs/drs.h"
 #include "lib/ldb/include/ldb.h"
 #include "dsdb/samdb/samdb.h"
 
@@ -193,7 +193,7 @@ static bool net_drs_replicate_sync_nc(struct net_drs_context *drs_ctx,
 }
 
 /**
- * 'net drs replicate' command entry point
+ * 'samba-tool drs replicate' command entry point
  */
 int net_drs_replicate_cmd(struct net_context *ctx, int argc, const char **argv)
 {
@@ -243,10 +243,10 @@ failed:
 }
 
 /**
- * 'net drs replicate' usage
+ * 'samba-tool drs replicate' usage
  */
 int net_drs_replicate_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>\n");
+       d_printf("samba-tool drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>\n");
        return 0;
 }
similarity index 98%
rename from source4/utils/net/drs/net_drs_showrepl.c
rename to source4/samba_tool/drs/drs_showrepl.c
index 584c29470785ed9b485cb3e104aa3d3b5e475907..f399097008a6ef4e9ce3d7be7188fad9b05810b0 100644 (file)
@@ -20,8 +20,8 @@
 */
 
 #include "includes.h"
-#include "utils/net/net.h"
-#include "net_drs.h"
+#include "samba_tool/samba_tool.h"
+#include "samba_tool/drs/drs.h"
 #include "lib/ldb/include/ldb.h"
 #include "dsdb/samdb/samdb.h"
 #include "lib/util/util_ldb.h"
@@ -539,7 +539,7 @@ static bool net_drs_showrepl_print_link_failures(struct net_drs_context *drs_ctx
 }
 
 /**
- * 'net drs showrepl' command entry point
+ * 'samba-tool drs showrepl' command entry point
  */
 int net_drs_showrepl_cmd(struct net_context *ctx, int argc, const char **argv)
 {
@@ -596,10 +596,10 @@ failed:
 }
 
 /**
- * 'net drs showrepl' usage
+ * 'samba-tool drs showrepl' usage
  */
 int net_drs_showrepl_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net drs showrepl <DC_NAME>\n");
+       d_printf("samba-tool drs showrepl <DC_NAME>\n");
        return 0;
 }
similarity index 89%
rename from source4/utils/net/net_gpo.c
rename to source4/samba_tool/gpo.c
index 6cddd975088528a3976a441a8807ab6229071e4a..65838d07123a22b0a1ab398dd094d73428fc045c 100644 (file)
@@ -22,7 +22,7 @@
 */
 
 #include "includes.h"
-#include "utils/net/net.h"
+#include "samba_tool/samba_tool.h"
 #include "lib/ldb/include/ldb.h"
 #include "auth/auth.h"
 #include "param/param.h"
@@ -33,8 +33,8 @@
 
 static int net_gpo_list_all_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo listall [options]\n");
-       d_printf("For a list of available options, please type net gpo listall --help\n");
+       d_printf("Syntax: samba-tool gpo listall [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo listall --help\n");
        return 0;
 }
 
@@ -85,8 +85,8 @@ static int net_gpo_list_all(struct net_context *ctx, int argc, const char **argv
 
 static int net_gpo_get_gpo_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo show <dn> [options]\n");
-       d_printf("For a list of available options, please type net gpo show --help\n");
+       d_printf("Syntax: samba-tool gpo show <dn> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo show --help\n");
        return 0;
 }
 
@@ -145,8 +145,8 @@ static int net_gpo_get_gpo(struct net_context *ctx, int argc, const char **argv)
 
 static int net_gpo_link_get_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo getlink <dn> [options]\n");
-       d_printf("For a list of available options, please type net gpo getlink --help\n");
+       d_printf("Syntax: samba-tool gpo getlink <dn> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo getlink --help\n");
        return 0;
 }
 
@@ -199,8 +199,8 @@ static int net_gpo_link_get(struct net_context *ctx, int argc, const char **argv
 
 static int net_gpo_list_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo list <username> [options]\n");
-       d_printf("For a list of available options, please type net gpo list --help\n");
+       d_printf("Syntax: samba-tool gpo list <username> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo list --help\n");
        return 0;
 }
 
@@ -302,8 +302,8 @@ static int net_gpo_list(struct net_context *ctx, int argc, const char **argv)
 
 static int net_gpo_link_set_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo setlink <container> <gpo> ['disable'] ['enforce'] [options]\n");
-       d_printf("For a list of available options, please type net gpo setlink --help\n");
+       d_printf("Syntax: samba-tool gpo setlink <container> <gpo> ['disable'] ['enforce'] [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo setlink --help\n");
        return 0;
 }
 
@@ -352,8 +352,8 @@ static int net_gpo_link_set(struct net_context *ctx, int argc, const char **argv
 
 static int net_gpo_link_del_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo dellink <container> <gpo> [options]\n");
-       d_printf("For a list of available options, please type net gpo dellink --help\n");
+       d_printf("Syntax: samba-tool gpo dellink <container> <gpo> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo dellink --help\n");
        return 0;
 }
 
@@ -389,8 +389,8 @@ static int net_gpo_link_del(struct net_context *ctx, int argc, const char **argv
 
 static int net_gpo_inheritance_get_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo getinheritance <container> [options]\n");
-       d_printf("For a list of available options, please type net gpo getinheritance --help\n");
+       d_printf("Syntax: samba-tool gpo getinheritance <container> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo getinheritance --help\n");
        return 0;
 }
 
@@ -429,8 +429,8 @@ static int net_gpo_inheritance_get(struct net_context *ctx, int argc, const char
 
 static int net_gpo_inheritance_set_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo setinheritance <container> <\"block\"|\"inherit\"> [options]\n");
-       d_printf("For a list of available options, please type net gpo setinheritance --help\n");
+       d_printf("Syntax: samba-tool gpo setinheritance <container> <\"block\"|\"inherit\"> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo setinheritance --help\n");
        return 0;
 }
 
@@ -473,8 +473,8 @@ static int net_gpo_inheritance_set(struct net_context *ctx, int argc, const char
 
 static int net_gpo_fetch_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo fetch <container> [options]\n");
-       d_printf("For a list of available options, please type net gpo fetch --help\n");
+       d_printf("Syntax: samba-tool gpo fetch <container> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo fetch --help\n");
        return 0;
 }
 
@@ -514,8 +514,8 @@ static int net_gpo_fetch(struct net_context *ctx, int argc, const char **argv)
 }
 static int net_gpo_create_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo create <displayname> [options]\n");
-       d_printf("For a list of available options, please type net gpo create --help\n");
+       d_printf("Syntax: samba-tool gpo create <displayname> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo create --help\n");
        return 0;
 }
 
@@ -548,8 +548,8 @@ static int net_gpo_create(struct net_context *ctx, int argc, const char **argv)
 
 static int net_gpo_set_acl_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo setacl <dn> <sddl> [options]\n");
-       d_printf("For a list of available options, please type net gpo setacl --help\n");
+       d_printf("Syntax: samba-tool gpo setacl <dn> <sddl> [options]\n");
+       d_printf("For a list of available options, please type samba-tool gpo setacl --help\n");
        return 0;
 }
 
@@ -607,8 +607,8 @@ static const struct net_functable net_gpo_functable[] = {
 
 int net_gpo_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("Syntax: net gpo <command> [options]\n");
-       d_printf("For available commands, please type net gpo help\n");
+       d_printf("Syntax: samba-tool gpo <command> [options]\n");
+       d_printf("For available commands, please type samba-tool gpo help\n");
        return 0;
 }
 
similarity index 92%
rename from source4/utils/net/net_password.c
rename to source4/samba_tool/password.c
index 55f7c3c31d610898eb6b86cf5945fcc907006a15..96b845b69d10577111becb66602ad1c162c30bc7 100644 (file)
@@ -1,6 +1,6 @@
-/* 
-   Samba Unix/Linux SMB client library 
-   Distributed SMB/CIFS Server Management Utility 
+/*
+   Samba Unix/Linux SMB client library
+   Distributed SMB/CIFS Server Management Utility
 
    Copyright (C) 2004 Stefan Metzmacher (metze@samba.org)
 
@@ -8,18 +8,18 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
-#include "utils/net/net.h"
+#include "samba_tool/samba_tool.h"
 #include "libnet/libnet.h"
 #include "system/filesys.h"
 #include "lib/events/events.h"
@@ -32,7 +32,7 @@
 static int net_password_change_usage(struct net_context *ctx, int argc, const char **argv)
 {
        d_printf("net_password_change_usage: TODO\n");
-       return 0;       
+       return 0;
 }
 
 
@@ -47,15 +47,15 @@ static int net_password_change(struct net_context *ctx, int argc, const char **a
        if (argc > 0 && argv[0]) {
                new_password = argv[0];
        } else {
-               password_prompt = talloc_asprintf(ctx, "Enter new password for account [%s\\%s]:", 
-                                                       cli_credentials_get_domain(ctx->credentials), 
+               password_prompt = talloc_asprintf(ctx, "Enter new password for account [%s\\%s]:",
+                                                       cli_credentials_get_domain(ctx->credentials),
                                                        cli_credentials_get_username(ctx->credentials));
                new_password = getpass(password_prompt);
        }
 
        libnetctx = libnet_context_init(ctx->event_ctx, ctx->lp_ctx);
        if (!libnetctx) {
-               return -1;      
+               return -1;
        }
        libnetctx->cred = ctx->credentials;
 
@@ -82,7 +82,7 @@ static int net_password_change(struct net_context *ctx, int argc, const char **a
 static int net_password_set_usage(struct net_context *ctx, int argc, const char **argv)
 {
        d_printf("net_password_set_usage: TODO\n");
-       return 0;       
+       return 0;
 }
 
 
@@ -123,14 +123,14 @@ static int net_password_set(struct net_context *ctx, int argc, const char **argv
        }
 
        if (!new_password) {
-               password_prompt = talloc_asprintf(ctx, "Enter new password for account [%s\\%s]:", 
+               password_prompt = talloc_asprintf(ctx, "Enter new password for account [%s\\%s]:",
                                                        domain_name, account_name);
                new_password = getpass(password_prompt);
        }
 
        libnetctx = libnet_context_init(ctx->event_ctx, ctx->lp_ctx);
        if (!libnetctx) {
-               return -1;      
+               return -1;
        }
        libnetctx->cred = ctx->credentials;
 
@@ -159,13 +159,13 @@ static const struct net_functable net_password_functable[] = {
        {NULL, NULL}
 };
 
-int net_password(struct net_context *ctx, int argc, const char **argv) 
+int net_password(struct net_context *ctx, int argc, const char **argv)
 {
        return net_run_function(ctx, argc, argv, net_password_functable, net_password_usage);
 }
 
 int net_password_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net password <command> [options]\n");
-       return 0;       
+       d_printf("samba-tool password <command> [options]\n");
+       return 0;
 }
similarity index 95%
rename from source4/utils/net/net.c
rename to source4/samba_tool/samba_tool.c
index 95b70ef01d2013b73a9321fda3c93302bbb47ea1..fd9e0e51d374279b94730e3859410ed0e81d0bfb 100644 (file)
@@ -1,6 +1,6 @@
-/* 
-   Samba Unix/Linux SMB client library 
-   Distributed SMB/CIFS Server Management Utility 
+/*
+   Samba Unix/Linux SMB client library
+   Distributed SMB/CIFS Server Management Utility
    Copyright (C) 2001 Steve French  (sfrench@us.ibm.com)
    Copyright (C) 2001 Jim McDonough (jmcd@us.ibm.com)
    Copyright (C) 2001 Andrew Tridgell (tridge@samba.org)
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+
 /*****************************************************/
 /*                                                   */
 /*   Distributed SMB/CIFS Server Management Utility  */
@@ -43,7 +43,7 @@
 
 #include <Python.h>
 #include "includes.h"
-#include "utils/net/net.h"
+#include "samba_tool/samba_tool.h"
 #include "lib/cmdline/popt_common.h"
 #include "lib/ldb/include/ldb.h"
 #include "librpc/rpc/dcerpc.h"
@@ -51,7 +51,7 @@
 #include "lib/events/events.h"
 #include "auth/credentials/credentials.h"
 #include "scripting/python/modules.h"
-#include "utils/net/drs/net_drs.h"
+#include "samba_tool/drs/drs.h"
 
 /* There's no Py_ssize_t in 2.4, apparently */
 #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
@@ -89,7 +89,7 @@ static int py_call_with_string_args(PyObject *self, const char *method, int argc
        if (py_method == NULL) {
                PyErr_Print();
                return 1;
-       }       
+       }
 
        ret = PyObject_CallObject(py_method, args);
 
@@ -117,7 +117,7 @@ static PyObject *py_commands(void)
        if (netcmd_module == NULL) {
                PyErr_Print();
                return NULL;
-       }       
+       }
 
        py_cmds = PyObject_GetAttrString(netcmd_module, "commands");
        if (py_cmds == NULL) {
@@ -135,11 +135,11 @@ static PyObject *py_commands(void)
 
 /*
   run a function from a function table. If not found then
-  call the specified usage function 
+  call the specified usage function
 */
 int net_run_function(struct net_context *ctx,
                        int argc, const char **argv,
-                       const struct net_functable *functable, 
+                       const struct net_functable *functable,
                        int (*usage_fn)(struct net_context *ctx, int argc, const char **argv))
 {
        int i;
@@ -184,7 +184,7 @@ int net_run_usage(struct net_context *ctx,
 
        py_cmd = PyDict_GetItemString(py_cmds, argv[0]);
        if (py_cmd != NULL) {
-               return py_call_with_string_args(py_cmd, "usage", argc-1, 
+               return py_call_with_string_args(py_cmd, "usage", argc-1,
                                                 argv+1);
        }
 
@@ -247,7 +247,7 @@ static int net_help_python(void)
                        return 1;
                }
                if (!PyString_Check(py_desc)) {
-                       d_printf("Command description for %s not a string\n", 
+                       d_printf("Command description for %s not a string\n",
                                name);
                        return 1;
                }
@@ -272,7 +272,7 @@ int net_help(struct net_context *ctx, const struct net_functable *ftable)
 static int net_usage(struct net_context *ctx, int argc, const char **argv)
 {
        d_printf("Usage:\n");
-       d_printf("net <command> [options]\n");
+       d_printf("samba-tool <command> [options]\n");
        net_help(ctx, net_functable);
        return -1;
 }
@@ -329,13 +329,13 @@ static int binary_net(int argc, const char **argv)
                }
        }
 
-       pc = poptGetContext("net", argc, (const char **) argv, long_options, 
+       pc = poptGetContext("net", argc, (const char **) argv, long_options,
                            POPT_CONTEXT_KEEP_FIRST);
 
        while((opt = poptGetNextOpt(pc)) != -1) {
                switch (opt) {
                default:
-                       d_printf("Invalid option %s: %s\n", 
+                       d_printf("Invalid option %s: %s\n",
                                 poptBadOption(pc, 0), poptStrerror(opt));
                        net_usage(ctx, argc, argv);
                        exit(1);
similarity index 83%
rename from source4/utils/net/net.h
rename to source4/samba_tool/samba_tool.h
index 16223a15bb9211f729579a1dbe42608e1fa42118..c8492e613bd61863d904e339079a647a7b70f528 100644 (file)
@@ -1,6 +1,6 @@
-/* 
-   Samba Unix/Linux SMB client library 
-   Distributed SMB/CIFS Server Management Utility 
+/*
+   Samba Unix/Linux SMB client library
+   Distributed SMB/CIFS Server Management Utility
 
    Copyright (C) Stefan Metzmacher 2004
 
@@ -8,18 +8,18 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifndef _UTIL_NET_H
-#define _UTIL_NET_H
+#ifndef _SAMBA_TOOL_H
+#define _SAMBA_TOOL_H
 
 struct net_context {
        struct cli_credentials *credentials;
@@ -34,6 +34,6 @@ struct net_functable {
        int (*usage)(struct net_context *ctx, int argc, const char **argv);
 };
 
-#include "utils/net/net_proto.h"
+#include "samba_tool/proto.h"
 
-#endif /* _UTIL_NET_H */
+#endif /* _SAMBA_TOOL_H */
similarity index 89%
rename from source4/utils/net/net_vampire.c
rename to source4/samba_tool/vampire.c
index c113ad70019a92b9b5907b9b366d20533a455e8e..7f16c82668b61918a8c5c2ca00ab5abb65aeff30 100644 (file)
@@ -1,6 +1,6 @@
-/* 
-   Samba Unix/Linux SMB client library 
-   Distributed SMB/CIFS Server Management Utility 
+/*
+   Samba Unix/Linux SMB client library
+   Distributed SMB/CIFS Server Management Utility
 
    Copyright (C) 2004 Stefan Metzmacher <metze@samba.org>
    Copyright (C) 2005 Andrew Bartlett <abartlet@samba.org>
@@ -9,18 +9,18 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
-#include "utils/net/net.h"
+#include "samba_tool/samba_tool.h"
 #include "libnet/libnet.h"
 #include "librpc/gen_ndr/samr.h"
 #include "auth/auth.h"
@@ -33,7 +33,7 @@ static const struct net_functable net_samdump_functable[] = {
        {NULL, NULL, NULL, NULL}
 };
 
-int net_samdump(struct net_context *ctx, int argc, const char **argv) 
+int net_samdump(struct net_context *ctx, int argc, const char **argv)
 {
        NTSTATUS status;
        struct libnet_context *libnetctx;
@@ -45,14 +45,14 @@ int net_samdump(struct net_context *ctx, int argc, const char **argv)
                break;
        case 1:
        default:
-               rc = net_run_function(ctx, argc, argv, net_samdump_functable, 
+               rc = net_run_function(ctx, argc, argv, net_samdump_functable,
                                      net_samdump_usage);
                return rc;
        }
 
        libnetctx = libnet_context_init(ctx->event_ctx, ctx->lp_ctx);
        if (!libnetctx) {
-               return -1;      
+               return -1;
        }
        libnetctx->cred = ctx->credentials;
 
@@ -75,17 +75,17 @@ int net_samdump(struct net_context *ctx, int argc, const char **argv)
 
 int net_samdump_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net samdump\n");
-       return 0;       
+       d_printf("samba-tool samdump\n");
+       return 0;
 }
 
 int net_samdump_help(struct net_context *ctx, int argc, const char **argv)
 {
        d_printf("Dumps the sam of the domain we are joined to.\n");
-       return 0;       
+       return 0;
 }
 
-int net_samsync_ldb(struct net_context *ctx, int argc, const char **argv) 
+int net_samsync_ldb(struct net_context *ctx, int argc, const char **argv)
 {
        NTSTATUS status;
        struct libnet_context *libnetctx;
@@ -93,7 +93,7 @@ int net_samsync_ldb(struct net_context *ctx, int argc, const char **argv)
 
        libnetctx = libnet_context_init(ctx->event_ctx, ctx->lp_ctx);
        if (!libnetctx) {
-               return -1;      
+               return -1;
        }
        libnetctx->cred = ctx->credentials;
 
@@ -119,12 +119,12 @@ int net_samsync_ldb(struct net_context *ctx, int argc, const char **argv)
 
 int net_samsync_ldb_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net samsync\n");
-       return 0;       
+       d_printf("samba-tool samsync\n");
+       return 0;
 }
 
 int net_samsync_ldb_help(struct net_context *ctx, int argc, const char **argv)
 {
        d_printf("Synchronise into the local ldb the SAM of a domain.\n");
-       return 0;       
+       return 0;
 }
diff --git a/source4/samba_tool/wscript_build b/source4/samba_tool/wscript_build
new file mode 100644 (file)
index 0000000..df4d2de
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+bld.SAMBA_MODULE('samba_tool_drs',
+       source='drs/drs.c drs/drs_bind.c drs/drs_kcc.c drs/drs_replicate.c drs/drs_showrepl.c',
+       autoproto='drs/drs_proto.h',
+       subsystem='samba-tool',
+       deps='LIBCLI_DRSUAPI ldb LDBSAMBA',
+       internal_module=True
+       )
+
+
+bld.SAMBA_BINARY('samba-tool',
+       source='samba_tool.c password.c vampire.c gpo.c',
+       autoproto='proto.h',
+       deps='samba-hostconfig samba-util samba-net popt POPT_SAMBA POPT_CREDENTIALS samba_tool_drs policy auth',
+       pyembed=True
+       )
index e43fefebdad13fec76ccd0050edecbddca18656a..e03234b3ca0105684bf07214d2550dd86b44365b 100644 (file)
@@ -62,7 +62,7 @@ rpc.lsa.forest                                                        # Not provided by Samba 4
 ^samba4.ntvfs.cifs.raw.samba3.*                                        # Samba3-specific test
 samba4.ntvfs.cifs.raw.
 ^samba4.rpc..*samba3.*                                         # Samba3-specific test
-^samba4.net.domopen.*$                         # Hangs for some reason
+^samba4.samba-tool.domopen.*$                          # Hangs for some reason
 nss.test                                               # Fails
 raw.offline                    # Samba 4 doesn't have much offline support yet
 rpc.autoidl  # this one just generates a lot of noise, and is no longer useful
index 5877f4f02cbe123f7ccd382024dab2751b4c6973..a252a87d081f3ecc751f97a81ed581a4ea6fc914 100755 (executable)
@@ -355,7 +355,7 @@ planperltestsuite("selftest.samba4", os.path.normpath(os.path.join(samba4srcdir,
 # work correctly.
 
 planpythontestsuite("none", "samba.tests.blackbox.ndrdump")
-plantestsuite("samba4.blackbox.net(dc:local)", "dc:local", [os.path.join(samba4srcdir, "utils/tests/test_net.sh"),  '$SERVER', "$USERNAME", "$PASSWORD", "$DOMAIN"])
+plantestsuite("samba4.blackbox.samba_tool(dc:local)", "dc:local", [os.path.join(samba4srcdir, "utils/tests/test_net.sh"),  '$SERVER', "$USERNAME", "$PASSWORD", "$DOMAIN"])
 plantestsuite("samba4.blackbox.pkinit(dc:local)", "dc:local", [os.path.join(bbdir, "test_pkinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", configuration])
 plantestsuite("samba4.blackbox.kinit(dc:local)", "dc:local", [os.path.join(bbdir, "test_kinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", configuration])
 plantestsuite("samba4.blackbox.kinit(fl2000dc:local)", "fl2000dc:local", [os.path.join(bbdir, "test_kinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "arcfour-hmac-md5", configuration])
index adffad1cc72260a5ff3bce04f628c8a37ebc71a5..451ae9d641843906e1d0016a33290f7d0597701a 100755 (executable)
@@ -15,60 +15,60 @@ shift 1
 
 rm -rf $PREFIX/simple-dc
 testit "simple-dc" $PYTHON ./setup/provision --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc
-net="./bin/net"
+samba_tool="./bin/samba-tool"
 
 CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
 
 #creation of two test subjects
-testit "newuser" $net newuser $CONFIG --given-name="User" --surname="Tester" --initial="UT" testuser testp@ssw0Rd
-testit "newuser" $net newuser $CONFIG --given-name="User1" --surname="Tester" --initial="UT" testuser1 testp@ssw0Rd
+testit "newuser" $samba_tool newuser $CONFIG --given-name="User" --surname="Tester" --initial="UT" testuser testp@ssw0Rd
+testit "newuser" $samba_tool newuser $CONFIG --given-name="User1" --surname="Tester" --initial="UT" testuser1 testp@ssw0Rd
 
 #test creation of six different groups
-testit "group add" $net group add $CONFIG --group-scope='Domain' --group-type='Security' --description='DomainSecurityGroup' --mail-address='dsg@samba.org' --notes='Notes' dsg
-testit "group add" $net group add $CONFIG --group-scope='Global' --group-type='Security' --description='GlobalSecurityGroup' --mail-address='gsg@samba.org' --notes='Notes' gsg
-testit "group add" $net group add $CONFIG --group-scope='Universal' --group-type='Security' --description='UniversalSecurityGroup' --mail-address='usg@samba.org' --notes='Notes' usg
-testit "group add" $net group add $CONFIG --group-scope='Domain' --group-type='Distribution' --description='DomainDistributionGroup' --mail-address='ddg@samba.org' --notes='Notes' ddg
-testit "group add" $net group add $CONFIG --group-scope='Global' --group-type='Distribution' --description='GlobalDistributionGroup' --mail-address='gdg@samba.org' --notes='Notes' gdg
-testit "group add" $net group add $CONFIG --group-scope='Universal' --group-type='Distribution' --description='UniversalDistributionGroup' --mail-address='udg@samba.org' --notes='Notes' udg
+testit "group add" $samba_tool group add $CONFIG --group-scope='Domain' --group-type='Security' --description='DomainSecurityGroup' --mail-address='dsg@samba.org' --notes='Notes' dsg
+testit "group add" $samba_tool group add $CONFIG --group-scope='Global' --group-type='Security' --description='GlobalSecurityGroup' --mail-address='gsg@samba.org' --notes='Notes' gsg
+testit "group add" $samba_tool group add $CONFIG --group-scope='Universal' --group-type='Security' --description='UniversalSecurityGroup' --mail-address='usg@samba.org' --notes='Notes' usg
+testit "group add" $samba_tool group add $CONFIG --group-scope='Domain' --group-type='Distribution' --description='DomainDistributionGroup' --mail-address='ddg@samba.org' --notes='Notes' ddg
+testit "group add" $samba_tool group add $CONFIG --group-scope='Global' --group-type='Distribution' --description='GlobalDistributionGroup' --mail-address='gdg@samba.org' --notes='Notes' gdg
+testit "group add" $samba_tool group add $CONFIG --group-scope='Universal' --group-type='Distribution' --description='UniversalDistributionGroup' --mail-address='udg@samba.org' --notes='Notes' udg
 
 #test adding test users to all groups by their username
-testit "group addmembers" $net group addmembers $CONFIG dsg newuser,newuser1
-testit "group addmembers" $net group addmembers $CONFIG gsg newuser,newuser1
-testit "group addmembers" $net group addmembers $CONFIG usg newuser,newuser1
-testit "group addmembers" $net group addmembers $CONFIG ddg newuser,newuser1
-testit "group addmembers" $net group addmembers $CONFIG gdg newuser,newuser1
-testit "group addmembers" $net group addmembers $CONFIG udg newuser,newuser1
+testit "group addmembers" $samba_tool group addmembers $CONFIG dsg newuser,newuser1
+testit "group addmembers" $samba_tool group addmembers $CONFIG gsg newuser,newuser1
+testit "group addmembers" $samba_tool group addmembers $CONFIG usg newuser,newuser1
+testit "group addmembers" $samba_tool group addmembers $CONFIG ddg newuser,newuser1
+testit "group addmembers" $samba_tool group addmembers $CONFIG gdg newuser,newuser1
+testit "group addmembers" $samba_tool group addmembers $CONFIG udg newuser,newuser1
 
 #test removing test users from all groups by their username
-testit "group removemembers" $net group removemembers $CONFIG dsg newuser,newuser1
-testit "group removemembers" $net group removemembers $CONFIG gsg newuser,newuser1
-testit "group removemembers" $net group removemembers $CONFIG usg newuser,newuser1
-testit "group removemembers" $net group removemembers $CONFIG ddg newuser,newuser1
-testit "group removemembers" $net group removemembers $CONFIG gdg newuser,newuser1
-testit "group removemembers" $net group removemembers $CONFIG udg newuser,newuser1
+testit "group removemembers" $samba_tool group removemembers $CONFIG dsg newuser,newuser1
+testit "group removemembers" $samba_tool group removemembers $CONFIG gsg newuser,newuser1
+testit "group removemembers" $samba_tool group removemembers $CONFIG usg newuser,newuser1
+testit "group removemembers" $samba_tool group removemembers $CONFIG ddg newuser,newuser1
+testit "group removemembers" $samba_tool group removemembers $CONFIG gdg newuser,newuser1
+testit "group removemembers" $samba_tool group removemembers $CONFIG udg newuser,newuser1
 
 #test adding test users to all groups by their cn
-#testit "group addmembers" $net group addmembers $CONFIG dsg "User UT. Tester,User1 UT. Tester"
-#testit "group addmembers" $net group addmembers $CONFIG gsg "User UT. Tester,User1 UT. Tester"
-#testit "group addmembers" $net group addmembers $CONFIG usg "User UT. Tester,User1 UT. Tester"
-#testit "group addmembers" $net group addmembers $CONFIG ddg "User UT. Tester,User1 UT. Tester"
-#testit "group addmembers" $net group addmembers $CONFIG gdg "User UT. Tester,User1 UT. Tester"
-#testit "group addmembers" $net group addmembers $CONFIG udg "User UT. Tester,User1 UT. Tester"
+#testit "group addmembers" $samba_tool group addmembers $CONFIG dsg "User UT. Tester,User1 UT. Tester"
+#testit "group addmembers" $samba_tool group addmembers $CONFIG gsg "User UT. Tester,User1 UT. Tester"
+#testit "group addmembers" $samba_tool group addmembers $CONFIG usg "User UT. Tester,User1 UT. Tester"
+#testit "group addmembers" $samba_tool group addmembers $CONFIG ddg "User UT. Tester,User1 UT. Tester"
+#testit "group addmembers" $samba_tool group addmembers $CONFIG gdg "User UT. Tester,User1 UT. Tester"
+#testit "group addmembers" $samba_tool group addmembers $CONFIG udg "User UT. Tester,User1 UT. Tester"
 
 #test removing test users from all groups by their cn
-#testit "group removemembers" $net group removemembers $CONFIG dsg "User UT. Tester,User1 UT. Tester"
-#testit "group removemembers" $net group removemembers $CONFIG gsg "User UT. Tester,User1 UT. Tester"
-#testit "group removemembers" $net group removemembers $CONFIG usg "User UT. Tester,User1 UT. Tester"
-#testit "group removemembers" $net group removemembers $CONFIG ddg "User UT. Tester,User1 UT. Tester"
-#testit "group removemembers" $net group removemembers $CONFIG gdg "User UT. Tester,User1 UT. Tester"
-#testit "group removemembers" $net group removemembers $CONFIG ugg "User UT. Tester,User1 UT. Tester"
+#testit "group removemembers" $samba_tool group removemembers $CONFIG dsg "User UT. Tester,User1 UT. Tester"
+#testit "group removemembers" $samba_tool group removemembers $CONFIG gsg "User UT. Tester,User1 UT. Tester"
+#testit "group removemembers" $samba_tool group removemembers $CONFIG usg "User UT. Tester,User1 UT. Tester"
+#testit "group removemembers" $samba_tool group removemembers $CONFIG ddg "User UT. Tester,User1 UT. Tester"
+#testit "group removemembers" $samba_tool group removemembers $CONFIG gdg "User UT. Tester,User1 UT. Tester"
+#testit "group removemembers" $samba_tool group removemembers $CONFIG ugg "User UT. Tester,User1 UT. Tester"
 
 #test deletion of the groups
-testit "group delete" $net group delete $CONFIG dsg
-testit "group delete" $net group delete $CONFIG gsg
-testit "group delete" $net group delete $CONFIG usg
-testit "group delete" $net group delete $CONFIG ddg
-testit "group delete" $net group delete $CONFIG gdg
-testit "group delete" $net group delete $CONFIG udg
+testit "group delete" $samba_tool group delete $CONFIG dsg
+testit "group delete" $samba_tool group delete $CONFIG gsg
+testit "group delete" $samba_tool group delete $CONFIG usg
+testit "group delete" $samba_tool group delete $CONFIG ddg
+testit "group delete" $samba_tool group delete $CONFIG gdg
+testit "group delete" $samba_tool group delete $CONFIG udg
 
 exit $failed
index e74950d25df9283166c5566841af05af78152294..aa45964f0034a508710282b839c2b540eade0c70 100755 (executable)
@@ -15,28 +15,28 @@ shift 1
 
 rm -rf $PREFIX/simple-dc
 testit "simple-dc" $PYTHON ./setup/provision --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc
-net="./bin/net"
+samba_tool="./bin/samba-tool"
 
 CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
 
 #two test for creating new user
 #newuser  account is created with cn=Given Name Initials. Surname
 #newuser1 account is created using cn=username
-testit "newuser" $net newuser $CONFIG --given-name="User" --surname="Tester" --initials="T" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser testp@ssw0Rd
-testit "newuser" $net newuser $CONFIG --use-username-as-cn --given-name="User1" --surname="Tester1" --initials="UT1" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser1 testp@ssw0Rd
+testit "newuser" $samba_tool newuser $CONFIG --given-name="User" --surname="Tester" --initials="T" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser testp@ssw0Rd
+testit "newuser" $samba_tool newuser $CONFIG --use-username-as-cn --given-name="User1" --surname="Tester1" --initials="UT1" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser1 testp@ssw0Rd
 
 # check the enable account script
-testit "enableaccount" $net enableaccount $CONFIG NewUser
-testit "enableaccount" $net enableaccount $CONFIG NewUser1
+testit "enableaccount" $samba_tool enableaccount $CONFIG NewUser
+testit "enableaccount" $samba_tool enableaccount $CONFIG NewUser1
 
 # check the enable account script
-testit "setpassword" $net setpassword $CONFIG NewUser --newpassword=testp@ssw0Rd2
-testit "setpassword" $net setpassword $CONFIG NewUser1 --newpassword=testp@ssw0Rd2
+testit "setpassword" $samba_tool setpassword $CONFIG NewUser --newpassword=testp@ssw0Rd2
+testit "setpassword" $samba_tool setpassword $CONFIG NewUser1 --newpassword=testp@ssw0Rd2
 
 # check the setexpiry script
-testit "noexpiry" $net setexpiry $CONFIG NewUser --noexpiry
-testit "noexpiry" $net setexpiry $CONFIG NewUser1 --noexpiry
-testit "expiry" $net setexpiry $CONFIG NewUser --days=7
-testit "expiry" $net setexpiry $CONFIG NewUser1 --days=7
+testit "noexpiry" $samba_tool setexpiry $CONFIG NewUser --noexpiry
+testit "noexpiry" $samba_tool setexpiry $CONFIG NewUser1 --noexpiry
+testit "expiry" $samba_tool setexpiry $CONFIG NewUser --days=7
+testit "expiry" $samba_tool setexpiry $CONFIG NewUser1 --days=7
 
 exit $failed
index da815531799a5fee1734ace36974be2cbb897065..6c405674c1a266e1a5f90508a4c557fb8dbd43a7 100755 (executable)
@@ -12,17 +12,17 @@ shift 1
 
 . `dirname $0`/../../../testprogs/blackbox/subunit.sh
 
-net="./bin/net"
+samba_tool="./bin/samba-tool"
 
 rm -rf $PREFIX/simple-dc
 testit "simple-dc" $PYTHON ./setup/provision --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc
 
-testit "newuser" $net newuser --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testp@ssw0Rd
+testit "newuser" $samba_tool newuser --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testp@ssw0Rd
 
-testit "setpassword" $net setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testp@ssw0Rd
+testit "setpassword" $samba_tool setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testp@ssw0Rd
 
-testit "setpassword" $net setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testp@ssw0Rd --must-change-at-next-login
+testit "setpassword" $samba_tool setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testp@ssw0Rd --must-change-at-next-login
 
-testit "pwsettings" $net pwsettings --quiet set --configfile=$PREFIX/simple-dc/etc/smb.conf --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default
+testit "pwsettings" $samba_tool pwsettings --quiet set --configfile=$PREFIX/simple-dc/etc/smb.conf --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default
 
 exit $failed
index f2fd8acfbb3e9d481ea233fbd4f250d9f17c74a1..515a06e437e7d3f78f197b799a7c7a6e0cd21a8c 100755 (executable)
@@ -13,21 +13,21 @@ shift 1
 . `dirname $0`/../../../testprogs/blackbox/subunit.sh
 
 
-net="./bin/net"
+samba_tool="./bin/samba-tool"
 
 CONFIG="--configfile=$PREFIX/etc/smb.conf"
 
 #creation of two test subjects
-testit "addspn" $net spn add FOO/bar Administrator $CONFIG
-testit "delspn" $net spn delete FOO/bar $CONFIG
-testit "readdspn" $net spn add FOO/bar Administrator $CONFIG
-testit_expect_failure "failexistingspn" $net spn add FOO/bar Guest $CONFIG
-testit "existingspnforce" $net spn add --force FOO/bar Guest  $CONFIG
-testit_expect_failure "faildelspnnotgooduser" $net spn delete FOO/bar krbtgt $CONFIG
-testit_expect_failure "faildelspnmoreoneuser" $net spn delete FOO/bar $CONFIG
-testit "deluserspn" $net spn delete FOO/bar Guest $CONFIG
-testit "dellastuserspn" $net spn delete FOO/bar $CONFIG
-testit_expect_failure "faildelspn" $net spn delete FOO/bar $CONFIG
-testit_expect_failure "failaddspn" $net spn add FOO/bar nonexistinguser $CONFIG
+testit "addspn" $samba_tool spn add FOO/bar Administrator $CONFIG
+testit "delspn" $samba_tool spn delete FOO/bar $CONFIG
+testit "readdspn" $samba_tool spn add FOO/bar Administrator $CONFIG
+testit_expect_failure "failexistingspn" $samba_tool spn add FOO/bar Guest $CONFIG
+testit "existingspnforce" $samba_tool spn add --force FOO/bar Guest  $CONFIG
+testit_expect_failure "faildelspnnotgooduser" $samba_tool spn delete FOO/bar krbtgt $CONFIG
+testit_expect_failure "faildelspnmoreoneuser" $samba_tool spn delete FOO/bar $CONFIG
+testit "deluserspn" $samba_tool spn delete FOO/bar Guest $CONFIG
+testit "dellastuserspn" $samba_tool spn delete FOO/bar $CONFIG
+testit_expect_failure "faildelspn" $samba_tool spn delete FOO/bar $CONFIG
+testit_expect_failure "failaddspn" $samba_tool spn add FOO/bar nonexistinguser $CONFIG
 
 exit $failed
index 0cf648f5a06b6565b8be6902509515343c42142f..2936a5717f5f71628b65aeb9192711e8bac32a81 100644 (file)
@@ -77,7 +77,7 @@ class DrsDeleteObjectTestCase(samba.tests.TestCase):
         self.config_dn = self.info_dc1["configurationNamingContext"][0]
         self.forest_level = int(self.info_dc1["forestFunctionality"][0])
 
-        # we will need DCs DNS names for 'net drs' command
+        # we will need DCs DNS names for 'samba-tool drs' command
         self.dnsname_dc1 = self.info_dc1["dnsHostName"][0]
         self.dnsname_dc2 = self.info_dc2["dnsHostName"][0]
 
@@ -127,13 +127,13 @@ class DrsDeleteObjectTestCase(samba.tests.TestCase):
 
     def _net_drs_replicate(self, DC, fromDC):
         # find out where is net command
-        net_cmd = os.path.abspath("./bin/net")
+        samba_tool_cmd = os.path.abspath("./bin/samba-tool")
         # make command line credentials string
         creds = samba.tests.cmdline_credentials
         cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
                                          creds.get_username(), creds.get_password())
-        # bin/net drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>
-        cmd_line = "%s drs replicate %s %s %s %s" % (net_cmd, DC, fromDC,
+        # bin/samba-tool drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>
+        cmd_line = "%s drs replicate %s %s %s %s" % (samba_tool_cmd, DC, fromDC,
                                                      self.domain_dn, cmd_line_auth)
         ret = os.system(cmd_line)
         self.assertEquals(ret, 0, "Replicating %s from %s has failed!" % (DC, fromDC))
index 251507413d375594d81077a70c60d88b4a877867..067ee2accb81a1c79b45b805dcc2d19b60467177 100644 (file)
@@ -91,13 +91,13 @@ class DrsFsmoTestCase(samba.tests.TestCase):
         super(DrsFsmoTestCase, self).tearDown()
 
     def _net_fsmo_role_transfer(self, DC, role):
-        # find out where is net command
-        net_cmd = os.path.abspath("./bin/net")
+        # find out where is samba-tool command
+        net_cmd = os.path.abspath("./bin/samba-tool")
         # make command line credentials string
         creds = samba.tests.cmdline_credentials
         cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
                                          creds.get_username(), creds.get_password())
-        # bin/net fsmo transfer --role=role --host=ldap://DC:389
+        # bin/samba-tool fsmo transfer --role=role --host=ldap://DC:389
         cmd_line = "%s fsmo transfer --role=%s --host=ldap://%s:389 %s" % (net_cmd, role, DC,
                                                                            cmd_line_auth)
         ret = os.system(cmd_line)
diff --git a/source4/utils/net/config.mk b/source4/utils/net/config.mk
deleted file mode 100644 (file)
index 032f685..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# $(utilssrcdir)/net subsystem
-
-
-#################################
-# Start MODULE net_drs
-[MODULE::net_drs]
-SUBSYSTEM = net
-OUTPUT_TYPE = MERGED_OBJ
-PRIVATE_DEPENDENCIES = \
-               LIBCLI_DRSUAPI \
-               LIBLDB
-# End MODULE net_drs
-#################################
-
-net_drs_OBJ_FILES = $(addprefix $(utilssrcdir)/net/drs/,  \
-               net_drs.o \
-               net_drs_bind.o \
-               net_drs_kcc.o \
-               net_drs_replicate.o \
-               net_drs_showrepl.o)
-
-$(eval $(call proto_header_template,$(utilssrcdir)/net/drs/net_drs_proto.h,$(net_drs_OBJ_FILES:.o=.c)))
-
-
-#################################
-# Start BINARY net
-[BINARY::net]
-INSTALLDIR = BINDIR
-PRIVATE_DEPENDENCIES = \
-               LIBSAMBA-HOSTCONFIG \
-               LIBSAMBA-UTIL \
-               LIBSAMBA-NET \
-               LIBPOPT \
-               POPT_SAMBA \
-               POPT_CREDENTIALS \
-               policy \
-               net_drs
-# End BINARY net
-#################################
-
-net_OBJ_FILES = $(addprefix $(utilssrcdir)/net/,  \
-               net.o \
-               net_password.o \
-               net_join.o \
-               net_vampire.o \
-               net_gpo.o)
-
-
-$(eval $(call proto_header_template,$(utilssrcdir)/net/net_proto.h,$(net_OBJ_FILES:.o=.c)))
-
diff --git a/source4/utils/net/wscript_build b/source4/utils/net/wscript_build
deleted file mode 100644 (file)
index 48c7663..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-
-bld.SAMBA_MODULE('net_drs',
-       source='drs/net_drs.c drs/net_drs_bind.c drs/net_drs_kcc.c drs/net_drs_replicate.c drs/net_drs_showrepl.c',
-       autoproto='drs/net_drs_proto.h',
-       subsystem='net',
-       deps='LIBCLI_DRSUAPI ldb LDBSAMBA',
-       internal_module=True
-       )
-
-
-bld.SAMBA_BINARY('net',
-       source='net.c net_password.c net_vampire.c net_gpo.c',
-       autoproto='net_proto.h',
-       deps='samba-hostconfig samba-util samba-net popt POPT_SAMBA POPT_CREDENTIALS net_drs policy auth',
-       pyembed=True
-       )
-
similarity index 70%
rename from source4/utils/tests/test_net.sh
rename to source4/utils/tests/test_samba_tool.sh
index 09394f41be7531e350043b9d0df22a00d726de57..0fb4c2afa85533127ce21190ff9d1aa2120a084e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Blackbox tests for net
+# Blackbox tests for samba-tool
 
 SERVER=$1
 USERNAME=$2
@@ -11,7 +11,7 @@ failed=0
 
 samba4bindir="$BUILDDIR/bin"
 smbclient="$samba4bindir/smbclient$EXEEXT"
-net="$samba4bindir/net$EXEEXT"
+samba_tool="$samba4bindir/samba-tool$EXEEXT"
 
 testit() {
        name="$1"
@@ -33,8 +33,8 @@ testit "Test login with --machine-pass without kerberos" $VALGRIND $smbclient -c
 
 testit "Test login with --machine-pass and kerberos" $VALGRIND $smbclient -c 'ls' $CONFIGURATION //$SERVER/tmp --machine-pass -k yes
 
-testit "time" $VALGRIND $net time $SERVER $CONFIGURATION  -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@
+testit "time" $VALGRIND $samba_tool time $SERVER $CONFIGURATION  -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@
 
-# FIXME: testit "domainlevel.show" $VALGRIND $net domainlevel show $CONFIGURATION
+# FIXME: testit "domainlevel.show" $VALGRIND $samba_tool domainlevel show $CONFIGURATION
 
 exit $failed
index 80675c9895b9330a5fb8b1b2388ecaa2d2cb2460..9b22132940c176176973bf16ad9bd1e184712d48 100644 (file)
@@ -64,7 +64,7 @@ bld.RECURSE('nbt_server')
 bld.RECURSE('wrepl_server')
 bld.RECURSE('cldap_server')
 bld.RECURSE('ntp_signd')
-bld.RECURSE('utils/net')
+bld.RECURSE('samba_tool')
 bld.RECURSE('utils')
 bld.RECURSE('ntvfs')
 bld.RECURSE('ntptr')
index 6f2abab694b6883883d55c1e3ad996876d2a4423..3982563a7d825b29e46d7cf2588b64f755a49eb8 100755 (executable)
@@ -21,8 +21,8 @@ failed=0
 samba4bindir="$BUILDDIR/bin"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
-net="$samba4bindir/net$EXEEXT"
-newuser="$net newuser"
+samba_tool="$samba4bindir/samba-tool$EXEEXT"
+newuser="$samba_tool newuser"
 
 . `dirname $0`/subunit.sh
 
@@ -46,8 +46,8 @@ USERPASS=testPaSS@01%
 
 testit "create user locally" $VALGRIND $newuser nettestuser $USERPASS $@ || failed=`expr $failed + 1`
 
-testit "export keytab from domain" $VALGRIND $net export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
-testit "export keytab from domain (2nd time)" $VALGRIND $net export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
+testit "export keytab from domain" $VALGRIND $samba_tool export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
+testit "export keytab from domain (2nd time)" $VALGRIND $samba_tool export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
 
 KRB5CCNAME="$PREFIX/tmpuserccache"
 export KRB5CCNAME
@@ -61,7 +61,7 @@ export KRB5CCNAME
 
 testit "kinit with keytab as $USERNAME" $VALGRIND $samba4kinit --keytab=$PREFIX/tmpkeytab --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
 
-testit "del user" $VALGRIND $net user delete nettestuser -k yes $@ || failed=`expr $failed + 1`
+testit "del user" $VALGRIND $samba_tool user delete nettestuser -k yes $@ || failed=`expr $failed + 1`
 
 rm -f $PREFIX/tmpadminccache $PREFIX/tmpuserccache $PREFIX/tmpkeytab
 exit $failed
index 2e65fe0088e79c9fc0d0380865c9bf348cc9594b..3eb2343e884172baa019fcacb6a86de437e73b82 100755 (executable)
@@ -23,12 +23,12 @@ failed=0
 samba4bindir="$BUILDDIR/bin"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
-net="$samba4bindir/net$EXEEXT"
+samba_tool="$samba4bindir/samba-tool$EXEEXT"
 ldbmodify="$samba4bindir/ldbmodify$EXEEXT"
 ldbsearch="$samba4bindir/ldbsearch$EXEEXT"
 rkpty="$samba4bindir/rkpty$EXEEXT"
 samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
-enableaccount="$samba4bindir/net enableaccount"
+enableaccount="$samba_tool enableaccount"
 machineaccountccache="$BUILDDIR/scripting/bin/machineaccountccache"
 
 . `dirname $0`/subunit.sh
@@ -57,7 +57,7 @@ export PWSETCONFIG
 KRB5CCNAME="$PREFIX/tmpccache"
 export KRB5CCNAME
 
-testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $net pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1`
+testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $samba_tool pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1`
 
 echo $PASSWORD > ./tmppassfile
 #testit "kinit with keytab" $samba4kinit $enctype --keytab=$PREFIX/dc/private/secrets.keytab $SERVER\$@$REALM   || failed=`expr $failed + 1`
@@ -68,11 +68,11 @@ testit "kinit renew ticket" $samba4kinit $enctype --request-pac -R
 
 test_smbclient "Test login with kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
 
-testit "check time with kerberos ccache" $VALGRIND $net $CONFIGURATION -k yes $@ time $SERVER || failed=`expr $failed + 1`
+testit "check time with kerberos ccache" $VALGRIND $samba_tool $CONFIGURATION -k yes $@ time $SERVER || failed=`expr $failed + 1`
 
 USERPASS=testPass@12%
 echo $USERPASS > ./tmpuserpassfile
-testit "add user with kerberos ccache" $VALGRIND $net user add nettestuser $USERPASS $CONFIGURATION  -k yes $@ || failed=`expr $failed + 1`
+testit "add user with kerberos ccache" $VALGRIND $samba_tool user add nettestuser $USERPASS $CONFIGURATION  -k yes $@ || failed=`expr $failed + 1`
 
 echo "Getting defaultNamingContext"
 BASEDN=`$ldbsearch $options --basedn='' -H ldap://$SERVER -s base DUMMY=x defaultNamingContext | grep defaultNamingContext | awk '{print $2}'`
@@ -86,7 +86,7 @@ EOF
 
 testit "modify servicePrincipalName" $VALGRIND $ldbmodify -H ldap://$SERVER ./tmpldbmodify -k yes $@ || failed=`expr $failed + 1`
 
-testit "set user password with kerberos ccache" $VALGRIND $net password set $DOMAIN\\nettestuser $USERPASS $CONFIGURATION  -k yes $@ || failed=`expr $failed + 1`
+testit "set user password with kerberos ccache" $VALGRIND $samba_tool password set $DOMAIN\\nettestuser $USERPASS $CONFIGURATION  -k yes $@ || failed=`expr $failed + 1`
 
 testit "enable user with kerberos cache" $VALGRIND $enableaccount nettestuser -H ldap://$SERVER -k yes $@ || failed=`expr $failed + 1`
 
@@ -98,7 +98,7 @@ testit "kinit with user password" $samba4kinit $enctype --password-file=./tmpuse
 test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
 
 NEWUSERPASS=testPaSS@34%
-testit "change user password with 'net password change' (rpc)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS $CONFIGURATION  -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
+testit "change user password with 'samba-tool password change' (rpc)" $VALGRIND $samba_tool password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS $CONFIGURATION  -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
 
 echo $NEWUSERPASS > ./tmpuserpassfile
 testit "kinit with user password" $samba4kinit $enctype --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
@@ -163,13 +163,13 @@ test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`exp
 KRB5CCNAME="$PREFIX/tmpccache"
 export KRB5CCNAME
 
-testit "del user with kerberos ccache" $VALGRIND $net user delete nettestuser $CONFIGURATION -k yes $@ || failed=`expr $failed + 1`
+testit "del user with kerberos ccache" $VALGRIND $samba_tool user delete nettestuser $CONFIGURATION -k yes $@ || failed=`expr $failed + 1`
 
 rm -f $KRB5CCNAME
 testit "kinit with machineaccountccache script" $machineaccountccache $CONFIGURATION $KRB5CCNAME || failed=`expr $failed + 1`
 test_smbclient "Test machine account login with kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
 
-testit "reset password policies" $VALGRIND $net pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
+testit "reset password policies" $VALGRIND $samba_tool pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
 
 rm -f $PREFIX/tmpccache tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript
 exit $failed
index ccbbcb993904cde194529dbd4a3e13ccfc28ef77..579389f97eabf1386b9c39a925ee62accedabcf9 100755 (executable)
@@ -13,14 +13,14 @@ shift 1
 . `dirname $0`/subunit.sh
 
 
-net="$BUILDDIR/bin/net"
+samba_tool="$BUILDDIR/bin/samba-tool"
 samba4bindir="$BUILDDIR/bin"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
 CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
 
 TESTUSER="ktpassUser"
 
-testit "newuser" $net newuser $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
+testit "newuser" $samba_tool newuser $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
 
 KRB5CCNAME="$PREFIX/tmpccache"
 export KRB5CCNAME
index de7e31ea77cfdf6c26eff6a52a0392f90b2ebe51..eb7cbf087b42f12facb96b7296e28664ae519b45 100755 (executable)
@@ -22,10 +22,10 @@ failed=0
 samba4bindir="$BUILDDIR/bin"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
-net="$samba4bindir/net$EXEEXT"
+samba_tool="$samba4bindir/samba-tool$EXEEXT"
 rkpty="$samba4bindir/rkpty$EXEEXT"
 samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
-newuser="$net newuser"
+newuser="$samba_tool newuser"
 
 . `dirname $0`/subunit.sh
 
@@ -48,7 +48,7 @@ test_smbclient() {
 CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
 export CONFIG
 
-testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $net pwsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1`
+testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $samba_tool pwsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1`
 
 USERPASS=testPaSS@01%
 
@@ -64,7 +64,7 @@ testit "kinit with user password" $samba4kinit --password-file=$PREFIX/tmpuserpa
 test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
 
 NEWUSERPASS=testPaSS@02%
-testit "change user password with 'net password change' (unforced)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS  -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
+testit "change user password with 'samba-tool password change' (unforced)" $VALGRIND $samba_tool password change -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS  -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
 
 echo $NEWUSERPASS > ./tmpuserpassfile
 testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
@@ -135,15 +135,15 @@ test_smbclient "Test login with user kerberos (unforced)" 'ls' -k yes -Unettestu
 
 
 NEWUSERPASS=testPaSS@04%
-testit "set password on user locally" $VALGRIND $net setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
+testit "set password on user locally" $VALGRIND $samba_tool setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
 USERPASS=$NEWUSERPASS
 
 NEWUSERPASS=testPaSS@05%
-testit "change user password with 'net password change' (after must change flag set)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
+testit "change user password with 'samba-tool password change' (after must change flag set)" $VALGRIND $samba_tool password change -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
 USERPASS=$NEWUSERPASS
 
 NEWUSERPASS=testPaSS@06%
-testit "set password on user locally" $VALGRIND $net setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
+testit "set password on user locally" $VALGRIND $samba_tool setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
 USERPASS=$NEWUSERPASS
 
 NEWUSERPASS=testPaSS@07%
@@ -164,33 +164,33 @@ USERPASS=$NEWUSERPASS
 test_smbclient "Test login with user kerberos" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1`
 
 NEWUSERPASS=abcdefg
-testit_expect_failure "try to set a non-complex password (command should not succeed)" $VALGRIND $net password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
+testit_expect_failure "try to set a non-complex password (command should not succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
 
-testit "allow non-complex passwords" $VALGRIND $net pwsettings set $CONFIG --complexity=off || failed=`expr $failed + 1`
+testit "allow non-complex passwords" $VALGRIND $samba_tool pwsettings set $CONFIG --complexity=off || failed=`expr $failed + 1`
 
-testit "try to set a non-complex password (command should succeed)" $VALGRIND $net password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ || failed=`expr $failed + 1`
+testit "try to set a non-complex password (command should succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ || failed=`expr $failed + 1`
 USERPASS=$NEWUSERPASS
 
 test_smbclient "test login with non-complex password" 'ls' -k no -Unettestuser@$REALM%$USERPASS || failed=`expr $failed + 1`
 
 NEWUSERPASS=abc
-testit_expect_failure "try to set a short password (command should not succeed)" $VALGRIND $net password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
+testit_expect_failure "try to set a short password (command should not succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
 
-testit "allow short passwords (length 1)" $VALGRIND $net pwsettings $CONFIG set --min-pwd-length=1 || failed=`expr $failed + 1`
+testit "allow short passwords (length 1)" $VALGRIND $samba_tool pwsettings $CONFIG set --min-pwd-length=1 || failed=`expr $failed + 1`
 
-testit "try to set a short password (command should succeed)" $VALGRIND $net password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ || failed=`expr $failed + 1`
+testit "try to set a short password (command should succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ || failed=`expr $failed + 1`
 USERPASS="$NEWUSERPASS"
 
-testit "require minimum password age of 1 day" $VALGRIND $net pwsettings $CONFIG set --min-pwd-age=1 || failed=`expr $failed + 1`
+testit "require minimum password age of 1 day" $VALGRIND $samba_tool pwsettings $CONFIG set --min-pwd-age=1 || failed=`expr $failed + 1`
 
-testit "show password settings" $VALGRIND $net pwsettings $CONFIG show || failed=`expr $failed + 1`
+testit "show password settings" $VALGRIND $samba_tool pwsettings $CONFIG show || failed=`expr $failed + 1`
 
 NEWUSERPASS="testPaSS@08%"
-testit_expect_failure "try to change password too quickly (command should not succeed)" $VALGRIND $net password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
+testit_expect_failure "try to change password too quickly (command should not succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
 
-testit "reset password policies" $VALGRIND $net pwsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
+testit "reset password policies" $VALGRIND $samba_tool pwsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
 
-testit "del user" $VALGRIND $net user delete nettestuser -U"$USERNAME%$PASSWORD" -k no $@ || failed=`expr $failed + 1`
+testit "del user" $VALGRIND $samba_tool user delete nettestuser -U"$USERNAME%$PASSWORD" -k no $@ || failed=`expr $failed + 1`
 
 rm -f tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript
 exit $failed
index e901f0f0db855e7b767778dd7e102c90a8541602..9a5741b16b9eed01ea595c1e4f8b021a1f223f95 100755 (executable)
@@ -23,12 +23,12 @@ failed=0
 samba4bindir="$BUILDDIR/bin"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
-net="$samba4bindir/net$EXEEXT"
+samba_tool="$samba4bindir/samba-tool$EXEEXT"
 ldbmodify="$samba4bindir/ldbmodify$EXEEXT"
 ldbsearch="$samba4bindir/ldbsearch$EXEEXT"
 rkpty="$samba4bindir/rkpty$EXEEXT"
 samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
-enableaccount="$samba4bindir/net enableaccount"
+enableaccount="$samba_tool enableaccount"
 machineaccountccache="$BUILDDIR/scripting/bin/machineaccountccache"
 
 . `dirname $0`/subunit.sh