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:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user