summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorGiampaolo Lauria <lauria2@yahoo.com>2011-11-07 13:39:07 -0500
committerAndrew Tridgell <tridge@samba.org>2011-11-10 14:24:21 +1100
commitda21ff82a50190da9023ef39046ec967d389ef97 (patch)
tree1d71cf05b7e7364e0acad83c4b2c1673635deaa8 /source4/scripting
parent53fc437d057208d182ec0afaa087ea8791c753ca (diff)
downloadsamba-da21ff82a50190da9023ef39046ec967d389ef97.tar.gz
samba-da21ff82a50190da9023ef39046ec967d389ef97.tar.bz2
samba-da21ff82a50190da9023ef39046ec967d389ef97.zip
samba-tool: Change internal argument name in domain machinepassword
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index af86a44d6d..871f72f952 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -341,20 +341,20 @@ class cmd_domain_machinepassword(Command):
synopsis = "%prog <accountname> [options]"
- takes_args = ["secret"]
+ takes_args = ["accountname"]
- def run(self, secret, sambaopts=None, credopts=None, versionopts=None):
+ def run(self, accountname, sambaopts=None, credopts=None, versionopts=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)
url = lp.private_path("secrets.ldb")
if not os.path.exists(url):
raise CommandError("secrets database not found at %s " % url)
- if not secret.endswith('$'):
- secret += '$'
+ if not accountname.endswith('$'):
+ accountname += '$'
secretsdb = Ldb(url=url, session_info=system_session(),
credentials=creds, lp=lp)
result = secretsdb.search(attrs=["secret"],
- expression="(&(objectclass=primaryDomain)(samaccountname=%s))" % ldb.binary_encode(secret))
+ expression="(&(objectclass=primaryDomain)(samaccountname=%s))" % ldb.binary_encode(accountname))
if len(result) != 1:
raise CommandError("search returned %d records, expected 1" % len(result))