diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-12-08 08:20:54 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-12-08 05:26:05 +0100 |
commit | 545932fda590d4c888c0f60fed7a36c1659f0018 (patch) | |
tree | 18bd10e6237e1c2489f25b4527cbd5bb260381ef /source4/scripting/python/samba/netcmd/gpo.py | |
parent | 249afc8906bc33ed1e23f50f5c28a8ba0b8354c9 (diff) | |
download | samba-545932fda590d4c888c0f60fed7a36c1659f0018.tar.gz samba-545932fda590d4c888c0f60fed7a36c1659f0018.tar.xz samba-545932fda590d4c888c0f60fed7a36c1659f0018.zip |
samba-tools: more reasonable defaults for samba-tool commands
- fallback to machine account where possible
- default to local hostname where this is reasonable
Diffstat (limited to 'source4/scripting/python/samba/netcmd/gpo.py')
-rw-r--r-- | source4/scripting/python/samba/netcmd/gpo.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/netcmd/gpo.py b/source4/scripting/python/samba/netcmd/gpo.py index 5e8748adc53..2b481aaf869 100644 --- a/source4/scripting/python/samba/netcmd/gpo.py +++ b/source4/scripting/python/samba/netcmd/gpo.py @@ -101,9 +101,7 @@ class cmd_listall(Command): self.url = H self.lp = sambaopts.get_loadparm() - self.creds = credopts.get_credentials(self.lp) - if not self.creds.authentication_requested(): - self.creds.set_machine_account(self.lp) + self.creds = credopts.get_credentials(self.lp, fallback_machine=True) samdb_connect(self) @@ -153,9 +151,7 @@ class cmd_list(Command): self.url = H self.lp = sambaopts.get_loadparm() - self.creds = credopts.get_credentials(self.lp) - if not self.creds.authentication_requested(): - self.creds.set_machine_account(self.lp) + self.creds = credopts.get_credentials(self.lp, fallback_machine=True) samdb_connect(self) |