# find out where is net command
samba_tool_cmd = os.path.abspath("./bin/samba-tool")
# make command line credentials string
- creds = samba.tests.cmdline_credentials
+ creds = self.get_credentials()
cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
creds.get_username(), creds.get_password())
# bin/samba-tool drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>
# 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
+ creds = self.get_credentials()
cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
creds.get_username(), creds.get_password())
# bin/samba-tool fsmo transfer --role=role --host=ldap://DC:389
# find out where is net command
samba_tool_cmd = os.path.abspath("./bin/samba-tool")
# make command line credentials string
- creds = samba.tests.cmdline_credentials
+ creds = self.get_credentials()
cmd_line_auth = "-U%s/%s%%%s" % (creds.get_domain(),
creds.get_username(), creds.get_password())
# bin/samba-tool drs replicate <Dest_DC_NAME> <Src_DC_NAME> <Naming Context>
import samba.tests
if not "ACCOUNT_NAME" in os.environ.keys():
- parser.error("Please supply ACCOUNT_NAME in environment")
+ raise Exception("Please supply ACCOUNT_NAME in environment")
if not "NEW_PASS" in os.environ.keys():
- parser.error("Please supply NEW_PASS in environment")
+ raise Exception("Please supply NEW_PASS in environment")
account_name = os.environ["ACCOUNT_NAME"]
new_pass = os.environ["NEW_PASS"]
-creds = samba.tests.cmdline_credentials
-
#
# Tests start here
#
########################################################################################
def test_SetPassword(self):
+ creds = self.get_credentials()
net.SetPassword(account_name=account_name,
domain_name=creds.get_domain(),
newpassword=new_pass,