mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
samba-gpupdate: Change machine option to target
On a Windows client, you designate machine/user apply with a 'target' parameter. This change makes gpupdate work more like that command. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jul 4 13:23:09 CEST 2018 on sn-devel-144
This commit is contained in:
parent
c8621948f6
commit
a958dc35bb
@ -641,7 +641,7 @@ sub provision_raw_step1($$)
|
||||
rndc command = true
|
||||
dns update command = $ctx->{samba_dnsupdate}
|
||||
spn update command = $ENV{SRCDIR_ABS}/source4/scripting/bin/samba_spnupdate -s $ctx->{smb_conf}
|
||||
gpo update command = $ENV{SRCDIR_ABS}/source4/scripting/bin/samba-gpupdate -s $ctx->{smb_conf} -H $ctx->{privatedir}/sam.ldb --machine
|
||||
gpo update command = $ENV{SRCDIR_ABS}/source4/scripting/bin/samba-gpupdate -s $ctx->{smb_conf} -H $ctx->{privatedir}/sam.ldb --target=Computer
|
||||
dreplsrv:periodic_startup_interval = 0
|
||||
dsdb:schema update allowed = yes
|
||||
|
||||
|
@ -62,7 +62,7 @@ static void gpupdate_callback(struct tevent_context *ev,
|
||||
gpupdate_cmd,
|
||||
"-s",
|
||||
smbconf,
|
||||
"--machine",
|
||||
"--target=Computer",
|
||||
"--machine-pass",
|
||||
NULL);
|
||||
if (req == NULL) {
|
||||
|
@ -49,8 +49,8 @@ if __name__ == "__main__":
|
||||
parser.add_option('-H', '--url', dest='url', help='URL for the samdb')
|
||||
parser.add_option('-X', '--unapply', help='Unapply Group Policy',
|
||||
action='store_true')
|
||||
parser.add_option('-M', '--machine', help='Apply machine policy',
|
||||
action='store_true', default=False)
|
||||
parser.add_option('--target', default='Computer', help='{Computer | User}',
|
||||
choices=['Computer', 'User'])
|
||||
parser.add_option_group(credopts)
|
||||
|
||||
# Set the options and the arguments
|
||||
@ -85,10 +85,10 @@ if __name__ == "__main__":
|
||||
store = GPOStorage(os.path.join(cache_dir, 'gpo.tdb'))
|
||||
|
||||
gp_extensions = []
|
||||
if opts.machine:
|
||||
if opts.target == 'Computer':
|
||||
if lp.get('server role') == 'active directory domain controller':
|
||||
gp_extensions.append(gp_sec_ext(logger))
|
||||
else:
|
||||
elif opts.target == 'User':
|
||||
pass # User extensions
|
||||
|
||||
# Get a live instance of Samba
|
||||
|
@ -59,6 +59,9 @@
|
||||
<para><option>-X</option>, <option>--unapply</option>
|
||||
Unapply Group Policy</para>
|
||||
|
||||
<para><option>--target</option>
|
||||
{Computer | User}</para>
|
||||
|
||||
<para>Samba Common Options:</para>
|
||||
|
||||
<para><option>-s </option>FILE, <option>--configfile</option>=<emphasis remap="I">FILE</emphasis>
|
||||
|
Loading…
Reference in New Issue
Block a user