add_group () {
GROUP=$1
- ${NET} ads group add "${GROUP}" -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads group add "${GROUP}" -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} ads group add returned error: $RET"
del_group () {
GROUP=$1
- ${NET} ads group delete "${GROUP}" -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads group delete "${GROUP}" -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
}
enum_group () {
- ${NET} ads group -k -s $CONFIG_FILE -S $SERVER > /dev/null
+ ${NET} ads group -k --configfile=$CONFIG_FILE -S $SERVER > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
info_group () {
GROUP=$1
- ${NET} ads group info "${GROUP}" -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads group info "${GROUP}" -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
join_domain () {
SERVER=$1
- ${NET} ads join -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads join -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
leave_domain () {
SERVER=$1
- ${NET} ads leave -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads leave -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
exit 1
SERVER=$2
search_users () {
- ${NET} ads search '(objectCategory=user)' sAMAccountName -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads search '(objectCategory=user)' sAMAccountName -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
}
search_groups () {
- ${NET} ads search '(objectCategory=group)' sAMAccountName -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads search '(objectCategory=group)' sAMAccountName -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
exit 1
}
search_computers () {
- ${NET} ads search '(objectCategory=computer)' sAMAccountName -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads search '(objectCategory=computer)' sAMAccountName -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
exit 1
}
search_wildcard () {
- ${NET} ads search '(objectCategory=*)' sAMAccountName -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads search '(objectCategory=*)' sAMAccountName -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
exit 1
}
search_unindexed () {
- ${NET} ads search '(description=Built-in account for adminstering the computer/domain)' sAMAccountName -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads search '(description=Built-in account for adminstering the computer/domain)' sAMAccountName -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
exit 1
add_user () {
USER=$1
- ${NET} ads user add "${USER}" 'Sup3rS3cr3T!' -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads user add "${USER}" 'Sup3rS3cr3T!' -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} ads user add returned error: $RET"
del_user () {
USER=$1
- ${NET} ads user delete "${USER}" -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads user delete "${USER}" -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
}
enum_user () {
- ${NET} ads user -k -s $CONFIG_FILE -S $SERVER > /dev/null
+ ${NET} ads user -k --configfile=$CONFIG_FILE -S $SERVER > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
info_user () {
USER=$1
- ${NET} ads user info "${USER}" -k -s $CONFIG_FILE -S ${SERVER} > /dev/null
+ ${NET} ads user info "${USER}" -k --configfile=$CONFIG_FILE -S ${SERVER} > /dev/null
RET=$?
if [ $RET -ne 0 ]; then
echo "${NET} returned error: $RET"
samba_bindir="$BINDIR"
wbinfo_tool="$VALGRIND $samba_bindir/wbinfo"
-net_tool="$VALGRIND $samba_bindir/net -s $SERVERCONFFILE"
+net_tool="$VALGRIND $samba_bindir/net --configfile=$SERVERCONFFILE"
. $(dirname $0)/../../testprogs/blackbox/subunit.sh
self.server.json_in = json_in.replace("%BASEPATH%", self.sharepath)
self.server.json_out = json_out.replace("%BASEPATH%", self.sharepath)
- output = self.check_output("mdsearch -s %s -U %s%%%s fileserver spotlight '*==\"samba*\"'" % (config, username, password))
+ output = self.check_output("mdsearch --configfile=%s -U %s%%%s fileserver spotlight '*==\"samba*\"'" % (config, username, password))
actual = output.decode('utf-8').splitlines()
expected = ["%s/%s" % (self.sharepath, file) for file in testfiles]
else:
self.fail("%s has no valid context" % param)
- cmdline = program + ["-s",
- self.smbconf,
+ program_arg1 = ["--configfile=%s" % (self.smbconf)]
+ if (program[0] == 'bin/testparm'):
+ program_arg1 = ["--suppress-prompt", self.smbconf]
+
+ cmdline = program + program_arg1 + [
"--section-name",
section,
"--parameter-name",
else:
self.fail("%s has no valid context" % param)
- cmdline = program + ["-s",
- self.smbconf,
+ program_arg1 = ["--configfile=%s" % (self.smbconf)]
+ if (program[0] == 'bin/testparm'):
+ program_arg1 = ["--suppress-prompt", self.smbconf]
+
+ cmdline = program + program_arg1 + [
"--section-name",
section,
"--parameter-name",
if value_to_use is None:
self.fail("%s has an invalid type" % param)
- cmdline = program + ["-s",
- self.smbconf,
+ program_arg1 = ["--configfile=%s" % (self.smbconf)]
+ if (program[0] == 'bin/testparm'):
+ program_arg1 = ["--suppress-prompt", self.smbconf]
+
+ cmdline = program + program_arg1 + [
"--section-name",
section,
"--parameter-name",
if program[0] == 'bin/samba-tool' and os.getenv("PYTHON", None):
program = [os.environ["PYTHON"]] + program
- p = subprocess.Popen(program + ["-s",
- self.blankconf,
- "--suppress-prompt"],
+ program_arg1 = ["--configfile=%s" % (self.blankconf), "--suppress-prompt"]
+ if (program[0] == 'bin/testparm'):
+ program_arg1 = ["--suppress-prompt", self.blankconf]
+
+ print(program + program_arg1)
+ p = subprocess.Popen(program + program_arg1,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=self.topdir).communicate()
def backup(self, prov_dir):
# Run the backup and check we got one backup tar file
cmd = ("samba-tool domain backup offline --targetdir={prov_dir} "
- "-s {prov_dir}/etc/smb.conf").format(prov_dir=prov_dir)
+ "--configfile={prov_dir}/etc/smb.conf").format(prov_dir=prov_dir)
self.check_output(cmd)
tar_files = [fn for fn in os.listdir(prov_dir)
@preargs = split(/ /, $valgrind);
}
my @args = ("-F", "--no-process-group",
- "-s", $env_vars->{SERVERCONFFILE},
+ "--configfile=$env_vars->{SERVERCONFFILE}",
"-l", $env_vars->{LOGDIR});
if (not defined($dont_log_stdout)) {
$ret{SMBD_TEST_LOG_POS} = 0;
$ret{SERVERCONFFILE} = $conffile;
$ret{TESTENV_DIR} = $prefix_abs;
- $ret{CONFIGURATION} ="-s $conffile";
+ $ret{CONFIGURATION} ="--configfile=$conffile";
$ret{LOCK_DIR} = $lockdir;
$ret{SERVER} = $server;
$ret{USERNAME} = $unix_name;
$ctx->{nsswrap_hostname} = "$ctx->{hostname}.$ctx->{dnsname}";
if ($ENV{SAMBA_DNS_FAKING}) {
$ctx->{dns_host_file} = "$ENV{SELFTEST_PREFIX}/dns_host_file";
- $ctx->{samba_dnsupdate} = "$ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate -s $ctx->{smb_conf} --all-interfaces --use-file=$ctx->{dns_host_file}";
+ $ctx->{samba_dnsupdate} = "$ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate --configfile=$ctx->{smb_conf} --all-interfaces --use-file=$ctx->{dns_host_file}";
$ctx->{samba_dnsupdate} = $python_cmd . $ctx->{samba_dnsupdate};
} else {
- $ctx->{samba_dnsupdate} = "$ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate -s $ctx->{smb_conf} --all-interfaces";
+ $ctx->{samba_dnsupdate} = "$ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate --configfile=$ctx->{smb_conf} --all-interfaces";
$ctx->{samba_dnsupdate} = $python_cmd . $ctx->{samba_dnsupdate};
$ctx->{use_resolv_wrapper} = 1;
}
server min protocol = SMB2_02
mangled names = yes
dns update command = $ctx->{samba_dnsupdate}
- spn update command = $ctx->{python} $ENV{SRCDIR_ABS}/source4/scripting/bin/samba_spnupdate -s $ctx->{smb_conf}
- gpo update command = $ctx->{python} $ENV{SRCDIR_ABS}/source4/scripting/bin/samba-gpupdate -s $ctx->{smb_conf} --target=Computer
+ spn update command = $ctx->{python} $ENV{SRCDIR_ABS}/source4/scripting/bin/samba_spnupdate --configfile $ctx->{smb_conf}
+ gpo update command = $ctx->{python} $ENV{SRCDIR_ABS}/source4/scripting/bin/samba-gpupdate --configfile $ctx->{smb_conf} --target=Computer
samba kcc command = $ctx->{python} $ENV{SRCDIR_ABS}/source4/scripting/bin/samba_kcc
dreplsrv:periodic_startup_interval = 0
dsdb:schema update allowed = yes
# create an offline backup of the 'backupfromdc' target
my $backupdir = File::Temp->newdir();
- my $cmd = "offline -s $dcvars->{SERVERCONFFILE}";
+ my $cmd = "offline --configfile $dcvars->{SERVERCONFFILE}";
my $backup_file = $self->create_backup($env, $dcvars,
$backupdir, $cmd);
EOF
testit "samba3-upgrade-member" $PYTHON $samba_tool domain classicupgrade $PREFIX/samba3-upgrade/samba3/smb1.conf --targetdir=$PREFIX/samba3-upgrade/s4_1 --dbdir=$PREFIX/samba3-upgrade/samba3 --use-ntvfs
-testit "samba3-upgrade-member-getlocalsid" $samba_net getlocalsid s3upgrade -s $PREFIX/samba3-upgrade/s4_1/etc/smb.conf
+testit "samba3-upgrade-member-getlocalsid" $samba_net getlocalsid s3upgrade --configfile=$PREFIX/samba3-upgrade/s4_1/etc/smb.conf
# Test 2 (s3 dc)
cat - > $PREFIX/samba3-upgrade/samba3/smb2.conf <<EOF
# Upgrade NT4-like domains in samba3upgrade
testit "samba3-upgrade-dc" $PYTHON $samba_tool domain classicupgrade $PREFIX/samba3-upgrade/samba3/smb2.conf --targetdir=$PREFIX/samba3-upgrade/s4_2 --dbdir=$PREFIX/samba3-upgrade/samba3 --use-ntvfs
-testit "samba3-upgrade-dc-getlocalsid" $samba_net getlocalsid samba -s $PREFIX/samba3-upgrade/s4_2/etc/smb.conf
-testit "samba3-upgrade-dc-getdomainsid" $samba_net getdomainsid -s $PREFIX/samba3-upgrade/s4_2/etc/smb.conf
+testit "samba3-upgrade-dc-getlocalsid" $samba_net getlocalsid samba --configfile=$PREFIX/samba3-upgrade/s4_2/etc/smb.conf
+testit "samba3-upgrade-dc-getdomainsid" $samba_net getdomainsid --configfile=$PREFIX/samba3-upgrade/s4_2/etc/smb.conf
#Run final test without a wins.dat
rm -f $PREFIX/samba3-upgrade/samba3/wins.dat
EOF
testit "samba3-upgrade-testparm" $PYTHON $samba_tool domain classicupgrade $PREFIX/samba3-upgrade/samba3/smb2.conf --targetdir=$PREFIX/samba3-upgrade/s4_3 --testparm=$testparm --use-ntvfs
-testit "samba3-upgrade-testparm-getlocalsid" $samba_net getlocalsid samba -s $PREFIX/samba3-upgrade/s4_3/etc/smb.conf
-testit "samba3-upgrade-testparm-getdomainsid" $samba_net getdomainsid -s $PREFIX/samba3-upgrade/s4_3/etc/smb.conf
+testit "samba3-upgrade-testparm-getlocalsid" $samba_net getlocalsid samba --configfile=$PREFIX/samba3-upgrade/s4_3/etc/smb.conf
+testit "samba3-upgrade-testparm-getdomainsid" $samba_net getdomainsid --configfile=$PREFIX/samba3-upgrade/s4_3/etc/smb.conf
rm -rf $PREFIX/samba3-upgrade
OPTS="$OPTS --debug-stderr"
# start samba and capture the debug output
- OUTPUT=$($BINDIR/samba -s $DBPATH/etc/smb.conf $OPTS 2>&1)
+ OUTPUT=$($BINDIR/samba --configfile=$DBPATH/etc/smb.conf $OPTS 2>&1)
if [ $? -eq 0 ] ; then
echo "ERROR: Samba should not have started successfully"
return 1
rm -fr $PREFIX/upgradeprovision
fi
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision" --server-role="dc" --use-ntvfs --base-schema=2008_R2
- $PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX/upgradeprovision/etc/smb.conf" --debugchange
+ $PYTHON $BINDIR/samba_upgradeprovision --configfile="$PREFIX/upgradeprovision/etc/smb.conf" --debugchange
}
upgradeprovision_full() {
rm -fr $PREFIX/upgradeprovision_full
fi
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_full" --server-role="dc" --use-ntvfs --base-schema=2008_R2
- $PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX/upgradeprovision_full/etc/smb.conf" --full --debugchange
+ $PYTHON $BINDIR/samba_upgradeprovision --configfile="$PREFIX/upgradeprovision_full/etc/smb.conf" --full --debugchange
}
# The ldapcmp runs here are to ensure that a 'null' run of
self.assertFalse("rIDSetReferences" in res[0])
- (result, out, err) = self.runsubcmd("fsmo", "seize", "--role", "rid", "-H", ldb_url, "-s", smbconf, "--force")
+ (result, out, err) = self.runsubcmd("fsmo", "seize", "--role", "rid", "-H", ldb_url, "--configfile=%s" % (smbconf), "--force")
self.assertCmdSuccess(result, out, err)
self.assertEqual(err, "", "Shouldn't be any error messages")
self.assertTrue("rIDSetReferences" in res[0])
rid_set_dn = ldb.Dn(new_ldb, res[0]["rIDSetReferences"][0].decode('utf8'))
# 4. Seize the RID Manager role
- (result, out, err) = self.runsubcmd("fsmo", "seize", "--role", "rid", "-H", ldb_url, "-s", smbconf, "--force")
+ (result, out, err) = self.runsubcmd("fsmo", "seize", "--role", "rid", "-H", ldb_url, "--configfile=%s" % (smbconf), "--force")
self.assertCmdSuccess(result, out, err)
self.assertEqual(err, "", "Shouldn't be any error messages")
new_dc_config_file = "%s/etc/smb.conf" % self.tempdir
- self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s"
+ self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s"
% ("invalid", self.dc1, nc_name,
self.cmdline_creds, new_dc_config_file))
self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1)
# pull that change with --local into local db from dc1: should send link and some objects
- out = self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s"
+ out = self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s"
% ("invalid", self.dc1, nc_name,
self.cmdline_creds, new_dc_config_file))
# pull that change with --local into local db from dc2: shouldn't send link or object
# as we sent an up-to-dateness vector showing that we had already synced with DC1
- out = self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s"
+ out = self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s"
% ("invalid", self.dc2, nc_name,
self.cmdline_creds, new_dc_config_file))
self.assertEqual(obj_2, 0)
self.assertEqual(link_2, 0)
- self.check_output("samba-tool domain demote --remove-other-dead-server=%s -H ldap://%s %s -s %s"
+ self.check_output("samba-tool domain demote --remove-other-dead-server=%s -H ldap://%s %s --configfile=%s"
% (netbiosname, self.dc1, self.cmdline_creds, new_dc_config_file))
def test_samba_tool_replicate_machine_creds_P(self):
forestdns_dn = ldb.binary_encode('DC=ForestDNSZones,' + str(nc_name))
domaindns_dn = ldb.binary_encode('DC=DomainDNSZones,' + str(nc_name))
- self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s --full-sync"
+ self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s --full-sync"
% ("invalid", self.dc1, forestdns_dn,
self.cmdline_creds, new_dc_config_file))
- self.check_output("samba-tool drs replicate --local %s %s %s %s -s %s --full-sync"
+ self.check_output("samba-tool drs replicate --local %s %s %s %s --configfile=%s --full-sync"
% ("invalid", self.dc1, domaindns_dn,
self.cmdline_creds, new_dc_config_file))
expression="(msds-hasmasterncs=%s)" % domaindns_dn)
self.assertEqual(len(res), 0)
- self.check_output("samba_upgradedns -s %s" % (new_dc_config_file))
+ self.check_output("samba_upgradedns --configfile=%s" % (new_dc_config_file))
res = samdb.search(base=server_ds_name,
expression="(msds-hasmasterncs=%s)" % forestdns_dn)
try:
# This fixes any forward-link-backward-link issues with the tools
- self.check_output("samba-tool dbcheck -s %s --cross-ncs --fix --yes" % (new_dc_config_file))
+ self.check_output("samba-tool dbcheck --configfile=%s --cross-ncs --fix --yes" % (new_dc_config_file))
except BlackboxProcessError as e:
self.assertTrue("Checked " in get_string(e.stdout))
- self.check_output("samba-tool dbcheck -s %s --cross-ncs" % (new_dc_config_file))
+ self.check_output("samba-tool dbcheck --configfile=%s --cross-ncs" % (new_dc_config_file))
# Compare the two directories
self.check_output("samba-tool ldapcmp ldap://%s ldb://%s %s --filter=%s" %
self.assertEqual(len(res), 1)
# Demote the DC we created in the test
- self.check_output("samba-tool domain demote --remove-other-dead-server=%s -H ldap://%s %s -s %s"
+ self.check_output("samba-tool domain demote --remove-other-dead-server=%s -H ldap://%s %s --configfile=%s"
% (netbiosname, self.dc1, self.cmdline_creds, new_dc_config_file))
$PYTHON $SRCDIR/source4/scripting/bin/renamedc \
--oldname="BAR" \
--newname="RAYMONBAR" \
- -s $PREFIX/renamedc_test/etc/smb.conf
+ --configfile=$PREFIX/renamedc_test/etc/smb.conf
}
confirmrenamedc() {
$PYTHON $SRCDIR/source4/scripting/bin/renamedc \
--oldname="RAYMONBAR" \
--newname="BAR" \
- -s $PREFIX/renamedc_test/etc/smb.conf
+ --configfile=$PREFIX/renamedc_test/etc/smb.conf
}
dbcheck_fix() {
# Unlike most calls to dbcheck --fix, this will not trigger an error, as
# we do not flag an error count for this old DN string case.
- $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs -s $PREFIX/renamedc_test/etc/smb.conf --fix \
+ $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --configfile=$PREFIX/renamedc_test/etc/smb.conf --fix \
--quiet --yes fix_all_old_dn_string_component_mismatch \
--attrs="fsmoRoleOwner interSiteTopologyGenerator msDS-NC-Replica-Locations"
}
dbcheck() {
- $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs -s $PREFIX/renamedc_test/etc/smb.conf
+ $PYTHON $BINDIR/samba-tool dbcheck --cross-ncs --configfile=$PREFIX/renamedc_test/etc/smb.conf
}
#check that drs options works before we change the password (prime the ccache)
test_drs options "Test drs options with with kerberos ccache" || failed=`expr $failed + 1`
-testit "change dc password" $PYTHON $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "change dc password" $PYTHON $samba4srcdir/scripting/devel/chgtdcpass --configfile=$PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
#This is important because it shows that the old ticket remains valid (as it must) for incoming connections after the DC password is changed
test_smbclient "Test login with kerberos ccache after password change" 'ls' "$unc" -k yes || failed=`expr $failed + 1`
#check that drs options works after we change the password
test_drs options "Test drs options with new password" || failed=`expr $failed + 1`
-testit "change dc password (2nd time)" $PYTHON $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "change dc password (2nd time)" $PYTHON $samba4srcdir/scripting/devel/chgtdcpass --configfile=$PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
# This is important because it shows that the old ticket is discarded if the server rejects it (as it must) after the password was changed twice in succession.
# This also ensures we handle the case where the domain is re-provisioned etc
failed=0
-net_tool="$BINDIR/net -s $BASEDIR/$WORKDIR/client.conf --option=security=ads --option=kerberosencryptiontypes=$ETYPE_CONF"
+net_tool="$BINDIR/net --configfile=$BASEDIR/$WORKDIR/client.conf --option=security=ads --option=kerberosencryptiontypes=$ETYPE_CONF"
pcap_file=$BASEDIR/$WORKDIR/test.pcap
export SOCKET_WRAPPER_PCAP_FILE=$pcap_file
failed=0
-net_tool="$BINDIR/net -s $BASEDIR/$WORKDIR/client.conf --option=security=ads"
+net_tool="$BINDIR/net --configfile=$BASEDIR/$WORKDIR/client.conf --option=security=ads"
ldbsearch="ldbsearch"
if [ -x "$BINDIR/ldbsearch" ]; then
failed=0
-net_tool="$BINDIR/net -s $BASEDIR/$WORKDIR/client.conf --option=security=ads"
+net_tool="$BINDIR/net --configfile=$BASEDIR/$WORKDIR/client.conf --option=security=ads"
# Load test functions
. `dirname $0`/subunit.sh
send ${NEWUSERPASS}\n
EOF
-testit "create user with pdbedit" $texpect $PREFIX/tmpsmbpasswdscript $VALGRIND $pdbedit -s $SMB_CONF -a $USER --account-desc="pdbedit-test-user" $@ || failed=`expr $failed + 1`
+testit "create user with pdbedit" $texpect $PREFIX/tmpsmbpasswdscript $VALGRIND $pdbedit --configfile=$SMB_CONF -a $USER --account-desc="pdbedit-test-user" $@ || failed=`expr $failed + 1`
USERPASS=$NEWUSERPASS
test_smbclient "Test login with user (ntlm)" 'ls' "$unc" -U$USER%$NEWUSERPASS $@ || failed=`expr $failed + 1`
-testit "modify user" $VALGRIND $pdbedit -s $SMB_CONF --modify $USER --drive="D:" $@ || failed=`expr $failed + 1`
+testit "modify user" $VALGRIND $pdbedit --configfile=$SMB_CONF --modify $USER --drive="D:" $@ || failed=`expr $failed + 1`
test_smbclient "Test login with user (ntlm)" 'ls' "$unc" -U$USER%$NEWUSERPASS $@|| failed=`expr $failed + 1`
NEWUSERPASS=testPaSS@03%
NEWUSERHASH=062519096c45739c1938800f80906731
-testit "Set user password with password hash" $VALGRIND $pdbedit -s $SMB_CONF -u $USER --set-nt-hash $NEWUSERHASH $@ || failed=`expr $failed + 1`
+testit "Set user password with password hash" $VALGRIND $pdbedit --configfile=$SMB_CONF -u $USER --set-nt-hash $NEWUSERHASH $@ || failed=`expr $failed + 1`
test_smbclient "Test login with new password (from hash)" 'ls' "$unc" -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
-testit "del user" $VALGRIND $pdbedit -s $SMB_CONF -x $USER $@ || failed=`expr $failed + 1`
+testit "del user" $VALGRIND $pdbedit --configfile=$SMB_CONF -x $USER $@ || failed=`expr $failed + 1`
rm $PREFIX/tmpsmbpasswdscript
testfile="$1"
exptextedacl="$2"
- retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl --use-ntvfs --xattr-backend=tdb -s $PREFIX/ad_member/lib/server.conf) || return $?
+ retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl --use-ntvfs --xattr-backend=tdb --configfile=$PREFIX/ad_member/lib/server.conf) || return $?
test "$retacl" = "$exptextedacl"
}
testfile="$1"
acl="$2"
- $PYTHON $samba_tool ntacl set "$acl" "$testfile" --use-ntvfs --xattr-backend=tdb -s $PREFIX/ad_member/lib/server.conf
+ $PYTHON $samba_tool ntacl set "$acl" "$testfile" --use-ntvfs --xattr-backend=tdb --configfile=$PREFIX/ad_member/lib/server.conf
}
test_changedomsid()
$PYTHON $samba_tool ntacl changedomsid \
"$domain_sid" "$new_domain_sid" "$testfile" \
--service=tmp \
- -s $PREFIX/ad_member/lib/server.conf
+ --configfile=$PREFIX/ad_member/lib/server.conf
retacl=$($PYTHON $samba_tool ntacl get \
"$testfile" \
--as-sddl \
--service=tmp \
- -s $PREFIX/ad_member/lib/server.conf) || return $?
+ --configfile=$PREFIX/ad_member/lib/server.conf) || return $?
test "$retacl" = "$new_acl"
}
"$domain_sid" "$new_domain_sid" "$testfile" \
--use-ntvfs \
--xattr-backend=tdb \
- -s $PREFIX/ad_member/lib/server.conf
+ --configfile=$PREFIX/ad_member/lib/server.conf
retacl=$($PYTHON $samba_tool ntacl get \
"$testfile" \
--as-sddl \
--xattr-backend=tdb \
--use-ntvfs \
- -s $PREFIX/ad_member/lib/server.conf) || return $?
+ --configfile=$PREFIX/ad_member/lib/server.conf) || return $?
test "$retacl" = "$new_acl"
}
. `dirname $0`/subunit.sh
-testit "run samba_upgradedns converting to bind9 DLZ" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "run samba_upgradedns converting to bind9 DLZ" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ --configfile=$PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
-testit "run samba_upgradedns converting to internal" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=SAMBA_INTERNAL -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "run samba_upgradedns converting to internal" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=SAMBA_INTERNAL --configfile=$PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
-testit "run samba_upgradedns converting to internal (2nd time)" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=SAMBA_INTERNAL -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "run samba_upgradedns converting to internal (2nd time)" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=SAMBA_INTERNAL --configfile=$PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
-testit "run samba_upgradedns converting to bind9 DLZ (2nd time)" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "run samba_upgradedns converting to bind9 DLZ (2nd time)" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ --configfile=$PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
-testit "run samba_upgradedns converting to bind9 DLZ (3rd time)" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
+testit "run samba_upgradedns converting to bind9 DLZ (3rd time)" $PYTHON $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ --configfile=$PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
exit $failed
upgradeprovision() {
# bring the really old Samba schema in line with a more recent 2008R2 schema
- $PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX_ABS/${RELEASE}_upgrade/etc/smb.conf" --debugchange
+ $PYTHON $BINDIR/samba_upgradeprovision --configfile="$PREFIX_ABS/${RELEASE}_upgrade/etc/smb.conf" --debugchange
# on top of this, also apply 2008R2 changes we accidentally missed in the past
$PYTHON $BINDIR/samba-tool domain schemaupgrade -H tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb --ldf-file=samba-4.7-missing-for-schema45.ldif,fix-forest-rev.ldf
# add missing domain prep for 2008R2
$PYTHON $BINDIR/samba-tool domain functionalprep -H tdb://$PREFIX_ABS/${RELEASE}_upgrade_full/private/sam.ldb --domain --function-level 2008_R2
- $PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX_ABS/${RELEASE}_upgrade_full/etc/smb.conf" --full --debugchange
+ $PYTHON $BINDIR/samba_upgradeprovision --configfile="$PREFIX_ABS/${RELEASE}_upgrade_full/etc/smb.conf" --full --debugchange
}
samba_upgradedns() {
- $PYTHON $BINDIR/samba_upgradedns --dns-backend=SAMBA_INTERNAL -s "$PREFIX_ABS/${RELEASE}_upgrade_full/etc/smb.conf"
+ $PYTHON $BINDIR/samba_upgradedns --dns-backend=SAMBA_INTERNAL --configfile="$PREFIX_ABS/${RELEASE}_upgrade_full/etc/smb.conf"
}
referenceprovision() {