summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-14 18:28:27 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-15 15:39:36 +1000
commit4e9f449106bb31cad87b7985837b2181c1df3558 (patch)
tree035fcb4cb9ff53800157644cab0ad0748e43ca9c /source4/scripting/python
parent011978eb1baf16c622ffcfcaf9944a217d95fadf (diff)
downloadsamba-4e9f449106bb31cad87b7985837b2181c1df3558.tar.gz
samba-4e9f449106bb31cad87b7985837b2181c1df3558.tar.bz2
samba-4e9f449106bb31cad87b7985837b2181c1df3558.zip
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>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/join.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/join.py b/source4/scripting/python/samba/netcmd/join.py
index ec8cd11122..e7e5941c63 100644
--- a/source4/scripting/python/samba/netcmd/join.py
+++ b/source4/scripting/python/samba/netcmd/join.py
@@ -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":