1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-16 20:59:12 +03:00

s4-join: give a clear error when using short domain form

we now require the full domain name, for the DNS/CLDAP lookup

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andrew Tridgell
2010-09-14 18:28:27 +10:00
parent 011978eb1b
commit 4e9f449106

View File

@ -28,7 +28,7 @@ from samba.join import join_rodc
class cmd_join(Command):
"""Joins domain as either member or backup domain controller [server connection needed]"""
synopsis = "%prog join <domain> [BDC | MEMBER | RODC] [options]"
synopsis = "%prog join <dnsdomain> [BDC | MEMBER | RODC] [options]"
takes_optiongroups = {
"sambaopts": options.SambaOptions,
@ -57,6 +57,9 @@ class cmd_join(Command):
if not role is None:
role = role.upper()
if domain.find('.') == -1:
raise CommandError("Please use the full DNS domain name, not the short form for '%s'" % domain)
if role is None:
secure_channel_type = SEC_CHAN_WKSTA
elif role == "BDC":