summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-08-23 08:52:19 +1000
committerAndrew Tridgell <tridge@samba.org>2010-08-23 15:55:39 +1000
commita2cb6ef017402e16d2012ffa165b66eb3dafe10b (patch)
treedf5b33f4200bc6f350bcdd7913363f0b2b6d6413 /source4/scripting/python
parent8a442b082284782987237a0ecf77213c43ed5dae (diff)
downloadsamba-a2cb6ef017402e16d2012ffa165b66eb3dafe10b.tar.gz
samba-a2cb6ef017402e16d2012ffa165b66eb3dafe10b.tar.bz2
samba-a2cb6ef017402e16d2012ffa165b66eb3dafe10b.zip
s4-net: moved the net join command to python
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/__init__.py2
-rw-r--r--source4/scripting/python/samba/netcmd/join.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py
index 08ddcefe91..331c543aab 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -164,3 +164,5 @@ from samba.netcmd.spn import cmd_spn
commands["spn"] = cmd_spn()
from samba.netcmd.group import cmd_group
commands["group"] = cmd_group()
+from samba.netcmd.join import cmd_join
+commands["join"] = cmd_join()
diff --git a/source4/scripting/python/samba/netcmd/join.py b/source4/scripting/python/samba/netcmd/join.py
index 90bb0775ab..4f04b77abf 100644
--- a/source4/scripting/python/samba/netcmd/join.py
+++ b/source4/scripting/python/samba/netcmd/join.py
@@ -22,7 +22,7 @@ import samba.getopt as options
from samba.net import Net, LIBNET_JOIN_AUTOMATIC
from samba.netcmd import Command, CommandError
-from samba.dcerpc.netr import SEC_CHAN_WKSTA, SEC_CHAN_BDC
+from samba.dcerpc.misc import SEC_CHAN_WKSTA, SEC_CHAN_BDC
class cmd_join(Command):
@@ -54,6 +54,6 @@ class cmd_join(Command):
raise CommandError("Invalid role %s (possible values: MEMBER, BDC)" % role)
(join_password, sid, domain_name) = net.join(domain,
- lp.get("netbios name"), SEC_CHAN_WKSTA, LIBNET_JOIN_AUTOMATIC)
+ lp.get("netbios name"), secure_channel_type, LIBNET_JOIN_AUTOMATIC)
self.outf.write("Joined domain %s (%s)\n" % (domain_name, sid))