diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-31 16:52:15 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-12-31 17:33:33 +1100 |
commit | 3239872bbcd81a690663f29c8fa20811d66f9dea (patch) | |
tree | b259ea75c483ff7961c560b19b5c24d251739eae /source4/scripting/python | |
parent | dbd7a62baa56eb2ce082fdcf24e2d8621a4f54ea (diff) | |
download | samba-3239872bbcd81a690663f29c8fa20811d66f9dea.tar.gz samba-3239872bbcd81a690663f29c8fa20811d66f9dea.tar.bz2 samba-3239872bbcd81a690663f29c8fa20811d66f9dea.zip |
s4-net: fixed pwsettings command
Don't override user settings with current settings
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/netcmd/pwsettings.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/netcmd/pwsettings.py b/source4/scripting/python/samba/netcmd/pwsettings.py index eb3bb65790..30f6f20d68 100644 --- a/source4/scripting/python/samba/netcmd/pwsettings.py +++ b/source4/scripting/python/samba/netcmd/pwsettings.py @@ -88,10 +88,10 @@ class cmd_pwsettings(Command): try: pwd_props = int(res[0]["pwdProperties"][0]) pwd_hist_len = int(res[0]["pwdHistoryLength"][0]) - min_pwd_len = int(res[0]["minPwdLength"][0]) + cur_min_pwd_len = int(res[0]["minPwdLength"][0]) # ticks -> days - min_pwd_age = int(abs(int(res[0]["minPwdAge"][0])) / (1e7 * 60 * 60 * 24)) - max_pwd_age = int(abs(int(res[0]["maxPwdAge"][0])) / (1e7 * 60 * 60 * 24)) + cur_min_pwd_age = int(abs(int(res[0]["minPwdAge"][0])) / (1e7 * 60 * 60 * 24)) + cur_max_pwd_age = int(abs(int(res[0]["maxPwdAge"][0])) / (1e7 * 60 * 60 * 24)) except KeyError: raise CommandError("Could not retrieve password properties!") @@ -103,9 +103,9 @@ class cmd_pwsettings(Command): else: self.message("Password complexity: off") self.message("Password history length: %d" % pwd_hist_len) - self.message("Minimum password length: %d" % min_pwd_len) - self.message("Minimum password age (days): %d" % min_pwd_age) - self.message("Maximum password age (days): %d" % max_pwd_age) + self.message("Minimum password length: %d" % cur_min_pwd_len) + self.message("Minimum password age (days): %d" % cur_min_pwd_age) + self.message("Maximum password age (days): %d" % cur_max_pwd_age) elif subcommand == "set": msgs = [] m = ldb.Message() |