· updated

Dolibarr default login and lost admin password

Nobody knows the Dolibarr administrator password any more. The “Password forgotten?” link, another administrator, or the database, without breaking the hashing.

Want someone to look at your instance? Diagnosis, fixed price €90.

Versions concerned
Database method accepted by the login code of versions 17, 19, 22 and 24 · tested on 24.0.1 (MariaDB)
What was checked (versions, tests, code read)

Tested on 12 October 2026 on a Dolibarr 24.0.1 test instance (MariaDB 10.11): temporary password set in SQL, login accepted, old password refused; password changed from the user card, then checked in the database: clear-text password erased, new password hashed, temporary password refused. Code read: core/login/functions_dolibarr.php (17.0.4, 19.0.4, 22, 24.0.1), user/passwordforgotten.php and core/lib/security2.lib.php (24.0.1). Code read on 18/11/2026: install/step4.php (24.0.3) and the official Docker image start script (docker-run.sh, 24.0.3).

The contractor who installed Dolibarr has left, or the only administrator no longer remembers the password. There are three ways out. Try them in this order.

What follows applies to Dolibarr’s standard authentication, the $dolibarr_main_authentication='dolibarr' line in conf.php. If your users log in through LDAP or another system, the password is changed in that system.

Default login: there is none, except in Docker

Standard installation, with the /install/ wizard: Dolibarr has no default login or password. You choose them in the wizard, at the step that creates the administrator account: the login field is empty, and in version 24 the password must be at least 8 characters long. If nobody wrote them down, use the three methods below.

Official Docker image (dolibarr/dolibarr): the administrator account is created on first start from the DOLI_ADMIN_LOGIN and DOLI_ADMIN_PASSWORD variables. If they are not set, it is admin / admin: change it at your first login. Our docker-compose generator draws a random password instead.

These two variables are used only on first start, while the database has no tables yet. Changing them later in docker-compose.yml does not change the password: use method 3.

The login page is simply your Dolibarr address: it shows as long as you are not logged in. In Docker, it is http://localhost: followed by the port published in docker-compose.yml.

It is on the login page, unless an administrator has hidden it (constant MAIN_SECURITY_DISABLEFORGETPASSLINK). Dolibarr then sends a reset link by email.

Two conditions for this to work: the user must have an email address on their user card, and Dolibarr’s email sending must work. But the administrator account created by the installer has no email address: on the test instance, the field was empty. For that account, the link often leads nowhere.

2. Another administrator

If another administrator account still works: Users & Groups, card of the user concerned, Modify, Password field, Save. This is the cleanest method.

3. Through the database

When nobody can log in any more, the database remains. You need access to MySQL or MariaDB: phpMyAdmin at most hosts, or the command line.

Tables have a prefix, llx_ by default. Yours is on the $dolibarr_main_db_prefix line of conf.php. To find the administrators’ logins:

SELECT login, email FROM llx_user WHERE admin = 1;

Then set a temporary password:

UPDATE llx_user SET pass = 'Temporary-to-change', pass_crypted = NULL WHERE login = 'admin';

Log in with that password, then change it immediately from the user card (Modify, Password, Save). Dolibarr then stores the new password hashed and erases the clear-text version: on the test instance, the pass column went back to empty and the temporary password no longer let anyone log in.

Why not a hash directly in SQL

Many tutorials give a query with MD5('…'). Whether it works depends on your instance’s settings: the way Dolibarr hashes passwords depends on the MAIN_SECURITY_HASH_ALGO constant, and sometimes on a salt. A hash computed by hand can therefore be refused with no explanation.

The temporary clear-text password goes through a path the login code keeps for very old installations, present in versions 17, 19, 22 and 24. It works whatever those settings are. It just must not stay in clear text: hence the immediate change.

In Docker

With the database in a MariaDB container, the console opens like this (replace the container, user and database names with yours):

docker exec -it <db_container> mariadb -u dolibarr -p dolibarr

See also

DolibarrpasswordadministratoradminresetSQLllx_user

Did this guide help you?

A question about this guide, or a step that does not go as expected on your side? Write to support@dolix.fr.