From ec5afae2925703c51c3ac6d26428b56954d8a57a Mon Sep 17 00:00:00 2001 From: Giampaolo Lauria Date: Tue, 1 Nov 2011 15:25:31 -0400 Subject: samba-tool: Fix domain machinepassword name search Append '$' to name provided by user to search for a machine account when necessary --- source4/scripting/python/samba/netcmd/domain.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py index 10bcfda7eb..9aaecd563c 100644 --- a/source4/scripting/python/samba/netcmd/domain.py +++ b/source4/scripting/python/samba/netcmd/domain.py @@ -351,6 +351,8 @@ class cmd_domain_machinepassword(Command): url = os.path.join(path, name) if not os.path.exists(url): raise CommandError("secret database not found at %s " % url) + if not secret.endswith('$'): + secret += '$' secretsdb = Ldb(url=url, session_info=system_session(), credentials=creds, lp=lp) result = secretsdb.search(attrs=["secret"], -- cgit