diff options
author | David Mulder <dmulder@suse.com> | 2018-05-07 09:48:32 -0600 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-07-04 13:23:09 +0200 |
commit | a958dc35bbeea61fa1344a10602e7d40c8339764 (patch) | |
tree | 87ab8065d224a5f4c71d3edf5774a86d267a86df /source4 | |
parent | c8621948f65d09cd3461cfacc4aa00051abb0796 (diff) | |
download | samba-a958dc35bbeea61fa1344a10602e7d40c8339764.tar.gz |
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
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/scripting/bin/samba-gpupdate | 8 | ||||
-rw-r--r-- | source4/scripting/man/samba-gpupdate.8.xml | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/scripting/bin/samba-gpupdate b/source4/scripting/bin/samba-gpupdate index 1a95d03c8ad..647acd9ada1 100755 --- a/source4/scripting/bin/samba-gpupdate +++ b/source4/scripting/bin/samba-gpupdate @@ -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 diff --git a/source4/scripting/man/samba-gpupdate.8.xml b/source4/scripting/man/samba-gpupdate.8.xml index 23b191c21b9..95f17bdd936 100644 --- a/source4/scripting/man/samba-gpupdate.8.xml +++ b/source4/scripting/man/samba-gpupdate.8.xml @@ -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> |