summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGiampaolo Lauria <lauria2@yahoo.com>2011-11-01 15:28:54 -0400
committerAndrew Tridgell <tridge@samba.org>2011-11-10 14:24:21 +1100
commit53fc437d057208d182ec0afaa087ea8791c753ca (patch)
treea7c118c237eedd2098c56d7d42c47c67a29f3302 /source4
parentec5afae2925703c51c3ac6d26428b56954d8a57a (diff)
downloadsamba-53fc437d057208d182ec0afaa087ea8791c753ca.tar.gz
samba-53fc437d057208d182ec0afaa087ea8791c753ca.tar.bz2
samba-53fc437d057208d182ec0afaa087ea8791c753ca.zip
samba-tool: Fix domain machinepassword secret db search
pair programmed with Jelmer Vernooij Add search to include secrets.ldb
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index 9aaecd563c..af86a44d6d 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -346,11 +346,9 @@ class cmd_domain_machinepassword(Command):
def run(self, secret, sambaopts=None, credopts=None, versionopts=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)
- name = lp.get("secrets database")
- path = lp.get("private dir")
- url = os.path.join(path, name)
+ url = lp.private_path("secrets.ldb")
if not os.path.exists(url):
- raise CommandError("secret database not found at %s " % url)
+ raise CommandError("secrets database not found at %s " % url)
if not secret.endswith('$'):
secret += '$'
secretsdb = Ldb(url=url, session_info=system_session(),