[Samba] samba-tool max-pwd-age error
Billy Bob
billysbobs at yahoo.com
Mon May 6 08:21:15 UTC 2019
See:
https://bugzilla.samba.org/show_bug.cgi?id=13873
and
https://lists.samba.org/archive/samba/2019-March/222141.html
These seem related, if not the same.
> It does appear to be a bug ;-)
>
> If you run:
>
> samba-tool domain passwordsettings --help
>
> Amongst the output is this:
>
> --min-pwd-age=MIN_PWD_AGE
> The minimum password age (<integer in days> |
> default). Default is 1.
>
> Which seems to say, if you don't supply the minimum password age, '1'
> will be used, BUT:
>
> The code runs like this:
>
> def run(self, H=None, min_pwd_age=None,........
>
>
> if min_pwd_age is not None:
> if min_pwd_age == "default":
> min_pwd_age = 1
> else:
> min_pwd_age = int(min_pwd_age)
>
> If you haven't supplied the minimum password age, the 'def' will set
> it to 'None'.
>
> This means that the code meant to set the minimum password age to '1'
> is never run because 'min_pwd_age' is 'None'
>
> I think the code should be:
>
> if min_pwd_age is None:
> if min_pwd_age == "default":
> min_pwd_age = 1
> else:
> min_pwd_age = int(min_pwd_age)
>
More information about the samba
mailing list