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

s4-net: moved the net join command to python

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andrew Tridgell
2010-08-23 08:52:19 +10:00
parent 8a442b0822
commit a2cb6ef017
5 changed files with 5 additions and 108 deletions

View File

@ -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()

View File

@ -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))