diff options
author | Giampaolo Lauria <lauria2@yahoo.com> | 2011-11-01 15:25:31 -0400 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-11-10 14:24:21 +1100 |
commit | ec5afae2925703c51c3ac6d26428b56954d8a57a (patch) | |
tree | 2f405914e62d6d23f8fc100a81775eb74dc3dab4 | |
parent | 46723aa2da81742995950ca3c6f403e081c5ba05 (diff) | |
download | samba-ec5afae2925703c51c3ac6d26428b56954d8a57a.tar.gz samba-ec5afae2925703c51c3ac6d26428b56954d8a57a.tar.bz2 samba-ec5afae2925703c51c3ac6d26428b56954d8a57a.zip |
samba-tool: Fix domain machinepassword name search
Append '$' to name provided by user to search for a machine account
when necessary
-rw-r--r-- | source4/scripting/python/samba/netcmd/domain.py | 2 |
1 files changed, 2 insertions, 0 deletions
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"], |