mirror of
https://github.com/samba-team/samba.git
synced 2025-12-21 20:23:50 +03:00
netcmd: Add samba-tool support for managing PSOs
Add a new command 'samba-tool domain passwordsettings pso', with the sub-command options: create, delete, set, list, show, show-user, apply, unapply. The apply and unapply options apply the PSO to a user or group. The show-user option shows the actual PSO (and its settings) that will take effect for a given user. The new commands are pretty self-contained in a new pso.py file. We decided to add these new commands under the existing 'samba-tool domain passwordsettings' command, as that's what users would be already familiar with. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
@@ -99,6 +99,8 @@ from samba.provision.common import (
|
||||
FILL_DRS
|
||||
)
|
||||
|
||||
from samba.netcmd.pso import cmd_domain_passwordsettings_pso
|
||||
|
||||
string_version_to_constant = {
|
||||
"2008_R2" : DS_DOMAIN_FUNCTION_2008_R2,
|
||||
"2012": DS_DOMAIN_FUNCTION_2012,
|
||||
@@ -1530,6 +1532,7 @@ class cmd_domain_passwordsettings(SuperCommand):
|
||||
"""Manage password policy settings."""
|
||||
|
||||
subcommands = {}
|
||||
subcommands["pso"] = cmd_domain_passwordsettings_pso()
|
||||
subcommands["show"] = cmd_domain_passwordsettings_show()
|
||||
subcommands["set"] = cmd_domain_passwordsettings_set()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user