From 4e9f449106bb31cad87b7985837b2181c1df3558 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 14 Sep 2010 18:28:27 +1000 Subject: 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 --- source4/scripting/python/samba/netcmd/join.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/scripting/python') 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 [BDC | MEMBER | RODC] [options]" + synopsis = "%prog join [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": -- cgit