summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGiampaolo Lauria <lauria2@yahoo.com>2011-11-11 10:37:39 -0500
committerAmitay Isaacs <amitay@gmail.com>2011-11-15 11:12:07 +1100
commitf057cb4f84f0aafd8c1ecc046b8c92f2fb812f87 (patch)
tree39627f5f258232fce97f4f4d021d40766f654dd3 /source4
parentd48f08fefb9ecaa7ebf9e92d121d3ce99c6802a9 (diff)
downloadsamba-f057cb4f84f0aafd8c1ecc046b8c92f2fb812f87.tar.gz
samba-f057cb4f84f0aafd8c1ecc046b8c92f2fb812f87.tar.bz2
samba-f057cb4f84f0aafd8c1ecc046b8c92f2fb812f87.zip
samba-tool: Remove "domain machinepassword" command
As per Andrew Bartlett's comment: "we should remove it. This was originally a script to support some interactions between samba3 and samba4, when they were in distinct build systems. We now can call between the two systems without difficulty at runtime, so this command has no value." Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index 35e9d29f2c..f1ebf7e2ba 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -336,33 +336,6 @@ class cmd_domain_level(Command):
-class cmd_domain_machinepassword(Command):
- """Gets a machine password out of our SAM"""
-
- synopsis = "%prog <accountname> [options]"
-
- takes_args = ["accountname"]
-
- 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 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(accountname))
-
- if len(result) != 1:
- raise CommandError("search returned %d records, expected 1" % len(result))
-
- self.outf.write("%s\n" % result[0]["secret"])
-
-
-
class cmd_domain_passwordsettings(Command):
"""Sets password settings
@@ -640,6 +613,5 @@ class cmd_domain(SuperCommand):
subcommands["exportkeytab"] = cmd_domain_export_keytab()
subcommands["join"] = cmd_domain_join()
subcommands["level"] = cmd_domain_level()
- subcommands["machinepassword"] = cmd_domain_machinepassword()
subcommands["passwordsettings"] = cmd_domain_passwordsettings()
subcommands["samba3upgrade"] = cmd_domain_samba3upgrade()