mirror of
https://github.com/samba-team/samba.git
synced 2025-12-02 00:23:50 +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:
committed by
Andrew Bartlett
parent
c8621948f6
commit
a958dc35bb
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user