How to change Plinth password?

I recently re-installed FBX and used a long password. I took note of it but my note taking app crashed and all content is lost. Now I can’t log into Plinth.

On a side note, my domain quit working. I can probably fix that once I can log into FBX. I can access FBX via IP address just fine.

On the local machine, I can log in and I changed the password in Debian/KDE for the FBX user but it must be recorded somewhere within Plinth files or database because I still can’t log in.

I have root access to the machine. How can I change my Plinth password from within Debian?

I can also access FBX via ssh so in either case, I guess I need a command.

FreedomBox uses ldap instead of the passwd file method. The method to do this is described here, but I’m not familiar with doing it. Looks possible since you have root and a terminal.

You’ll have to adapt this because you need to fix the fbx user password, not the accounts described in the wiki.

1 Like

Currently, the password is stored in Django database in /var/lib/plinth/plinth.sqlite3, LDAP database, and samba (this is set to simplify in future). I wrote a small script to change the password from command line. Download this script and run it as follows:

wget https://salsa.debian.org/sunilmohan/freedombox/-/raw/password-change-tool/bin/freedombox-change-password
chmod +x freedombox-change-password
./freedombox-change-password <username>

This will set the password in all three places.

The next release of FreedomBox will ship with this utility. It will be installed as /usr/bin/freedombox-change-password.

1 Like

@Sunil, we use this script if we have a problem similar to this post, correct? Changing one’s password in plinth will be a complete operation and we’d only use this script if we are unable to do this maybe having lost a password or something. Do I have that correctly?

This script will only work from the command line as a privileged user. That means that user must be logged into the system as a root user (or inserted the disk into another computer and chrooted into it with slapd and samba running). So, it is only useful in very specific situations. However, this script does a complete password change: in Plinth database, in LDAP, and in Samba database.

The recommended way to change password is still the web interface. The script is only useful when user forgot the admin password.

1 Like

I assume I replace <username> with my fbx user name. Do I keep the brackets?

Don’t keep the brackets. Example: ./freedombox-change-password myuser . I should have mentioned ealier.