Skip to main content

How to Disable Password Policy in the Calamares Installer on Debian Live

· 2 min read
Hirusha Adikari
Student interested in Tech

For those who don't find the default Debian installer ("d-i") frustrating, you also have the option to install Debian using the Calamares installer. Additionally, there's a lot to configure post-install. To avoid all of this trouble, you can use the Debian Live installer, which uses Calamares.

By default, Calamares configuration in Debian Live enforces some password policies to prevent users from entering weak passwords. This is a very important feature, but I find it too complicated for virtual machines and testing scenarios. Therefore, in this article, let's see how to disable it and use a simple password.

alt text

Issue

If I try to use a short password like 123, it says the password shouldn't be less than 6 characters in length.

alt text

And a password like Debian@VM fails the dictionary check.

alt text

Even Debian@VM is already too much for a password of a virtual machine that I only use for testing purposes.

Fix

We can disable this password policy easily.

To begin with, close the Calamares installer if you already have it opened.

Next, open any available terminal emulator. In this case, since I'm using the KDE Debian Live image - it's konsole.

alt text

Then, locate the files named like *users.conf inside the /etc/calamares directory, where the configuration files for the Calamares installer are stored.

sudo find /etc/calamares -name "*users.conf"

In my live boot, the relevant configuration file is stored at /etc/calamares/modules/users.conf.

alt text

The next step is to open it with your preffered text editor.

sudo nano /etc/calamares/modules/users.conf

Scroll down and locate the text that says:

passwordRequirements:
nonempty: true
minLength: -1
maxLength: 0
libpwquality:
- minlen=0
- minclass=0

It is at the very bottom of my file.

alt text

You can then get rid of this and replace it with the following:

passwordRequirements:
minLength: 1

Or you can just comment it out and paste this underneath like I did.

alt text

Now, save the file, exit, and restart the Calamares installer.

Try entering a simple password now and it should work without any restrictions.

alt text

Note!

I strongly suggest you NOT to do this on bare-metal installations.

A short version of this article can be found here: https://gist.github.com/hirusha-adi/676724ea65abdd17b9d05b8eb76833fd