1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +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

@ -76,7 +76,7 @@ class cmd_group_add(Command):
gtype = distribution_group.get(group_scope, GTYPE_DISTRIBUTION_GLOBAL_GROUP)
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
creds = credopts.get_credentials(lp, fallback_machine=True)
try:
samdb = SamDB(url=H, session_info=system_session(),
@ -107,7 +107,7 @@ class cmd_group_delete(Command):
def run(self, groupname, credopts=None, sambaopts=None, versionopts=None, H=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
creds = credopts.get_credentials(lp, fallback_machine=True)
try:
samdb = SamDB(url=H, session_info=system_session(),
@ -138,7 +138,7 @@ class cmd_group_add_members(Command):
versionopts=None, H=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
creds = credopts.get_credentials(lp, fallback_machine=True)
try:
samdb = SamDB(url=H, session_info=system_session(),
@ -169,7 +169,7 @@ class cmd_group_remove_members(Command):
versionopts=None, H=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
creds = credopts.get_credentials(lp, fallback_machine=True)
try:
samdb = SamDB(url=H, session_info=system_session(),