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

s4-net: added --ipaddress option to net commands

this allows override of server IP address, bypassing NBT or DNS name
resolution of DCs

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andrew Tridgell
2010-09-23 19:51:36 -07:00
parent 3d7a4cf5b6
commit c53210bf06
6 changed files with 13 additions and 6 deletions

View File

@ -42,7 +42,7 @@ class cmd_user_add(Command):
def run(self, name, password=None, credopts=None, sambaopts=None, versionopts=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
net = Net(creds, lp)
net = Net(creds, lp, server=credopts.ipaddress)
net.create_user(name)
if password is not None:
net.set_password(name, creds.get_domain(), password, creds)
@ -63,7 +63,7 @@ class cmd_user_delete(Command):
def run(self, name, credopts=None, sambaopts=None, versionopts=None):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
net = Net(creds, lp)
net = Net(creds, lp, server=credopts.ipaddress)
net.delete_user(name)