s4:pwsettings: Add 'default' option for password complexity.
authorAndrew Kroeger <andrew@id10ts.net>
Tue, 8 Sep 2009 07:34:30 +0000 (02:34 -0500)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Wed, 9 Sep 2009 23:09:55 +0000 (01:09 +0200)
source4/setup/pwsettings

index 7206d7116b8c9a0eb159614242b45a637c5501cb..44e12d0a98c21cd55afeacce38b8d229c065b1e7 100755 (executable)
@@ -31,7 +31,7 @@ parser.add_option_group(credopts)
 parser.add_option("--quiet", help="Be quiet", action="store_true")
 parser.add_option("-H", help="LDB URL for database or target server", type=str)
 parser.add_option("--complexity",
 parser.add_option("--quiet", help="Be quiet", action="store_true")
 parser.add_option("-H", help="LDB URL for database or target server", type=str)
 parser.add_option("--complexity",
-  help="The password complexity (on | off). Default is 'on'", type=str)
+  help="The password complexity (on | off | default). Default is 'on'", type=str)
 parser.add_option("--history-length",
   help="The password history length (<integer> | default)", type=str)
 parser.add_option("--min-pwd-length",
 parser.add_option("--history-length",
   help="The password history length (<integer> | default)", type=str)
 parser.add_option("--min-pwd-length",
@@ -106,7 +106,7 @@ elif args[0] == "set":
        m.dn = ldb.Dn(samdb, domain_dn)
 
        if opts.complexity is not None:
        m.dn = ldb.Dn(samdb, domain_dn)
 
        if opts.complexity is not None:
-               if opts.complexity == "on":
+               if opts.complexity == "on" or opts.complexity == "default":
                        pwd_props = pwd_props | DOMAIN_PASSWORD_COMPLEX
                        msgs.append("Password complexity activated!")
                elif opts.complexity == "off":
                        pwd_props = pwd_props | DOMAIN_PASSWORD_COMPLEX
                        msgs.append("Password complexity activated!")
                elif opts.complexity == "off":