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:
@ -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()
|
||||
|
@ -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))
|
||||
|
Reference in New Issue
Block a user