1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-19 04:59:10 +03:00

samba-tools: more reasonable defaults for samba-tool commands

- fallback to machine account where possible

- default to local hostname where this is reasonable
This commit is contained in:
Andrew Tridgell
2010-12-08 08:20:54 +11:00
parent 249afc8906
commit 545932fda5
13 changed files with 79 additions and 53 deletions

View File

@ -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)