diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index b6072c741..b898f00c8 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -174,12 +174,7 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } m_widget->setPasswordCheckboxVisible( CalamaresUtils::getBool( configurationMap, "allowWeakPasswords", false ) ); - - if ( configurationMap.contains( "doPasswordChecks" ) - && configurationMap.value( "doPasswordChecks" ).type() == QVariant::Bool ) - { - m_widget->setValidatePasswordDefault( configurationMap.value( "doPasswordChecks" ).toBool() ); - } + m_widget->setValidatePasswordDefault( !CalamaresUtils::getBool( configurationMap, "allowWeakPasswordsDefault", false) ); QString shell( QLatin1String( "/bin/bash" ) ); // as if it's not set at all if ( configurationMap.contains( "userShell" ) ) diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 2e164cf13..cae9bef0d 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -81,7 +81,7 @@ doReusePassword: true # comment out the relevant 'passwordRequirements' keys below. # - To disable all password validations: # set both 'allowWeakPasswords' and 'allowWeakPasswordsDefault' to true. -# (This will show the box *Allow weak passwords* in the user- +# (That will show the box *Allow weak passwords* in the user- # interface, and check it by default). passwordRequirements: minLength: -1 # Password at least this many characters @@ -90,19 +90,22 @@ passwordRequirements: - minlen=0 - minclass=0 -# You can control the visibility of the 'weak passwords' checkbox here. +# You can control the visibility of the 'strong passwords' checkbox here. # Possible values are: # - true to show or -# - false to hide +# - false to hide (default) # the checkbox. This checkbox allows the user to choose to disable -# password-strength-checks. -allowWeakPasswords: true -# You can control the initial state for the 'weak passwords' checkbox here. +# password-strength-checks. By default the box is **hidden**, so +# that you have to pick a password that satisfies the checks. +allowWeakPasswords: false +# You can control the initial state for the 'strong passwords' checkbox here. # Possible values are: -# - true to check or -# - false to uncheck -# the checkbox by default. -doPasswordChecks: true +# - true to uncheck or +# - false to check (default) +# the checkbox by default. Since the box is labeled to enforce strong +# passwords, in order to **allow** weak ones by default, the box needs +# to be unchecked. +allowWeakPasswordsDefault: false # Shell to be used for the regular user of the target system. # There are three possible kinds of settings: