💬 General ✓ Solved

How to reset the Vtiger admin password from phpMyAdmin

👤 balduin_dev
Q
Question
I locked myself out of my Vtiger installation after a server migration. The admin credentials stopped working and I cannot access the reset password link because the outgoing mail server is not configured yet. I have access to phpMyAdmin though. What is the safest way to reset the admin username and password directly in the database without breaking anything?

Vtiger version: 7.4.0
MySQL: 8.0
Server: Ubuntu 20.04
A
Community Solution
✓ Answered
You can safely reset the admin password directly in the database. Always take a full database backup before running any SQL.

Reset password to 'admin' (quickest fix):

sql
UPDATE vtiger_users
SET user_password = 'adpexzg3FUZAk', crypt_type = ''
WHERE user_name = 'admin';


This sets the password to admin. Log in immediately and change it to something strong.

Change both username and password:

sql
UPDATE vtiger_users
SET
user_name = 'newadmin',
user_password = MD5('YourNewPassword'),
crypt_type = 'MD5'
WHERE id = 1;


Verify the user ID before running:

sql
SELECT id, user_name, is_admin FROM vtiger_users WHERE is_admin = 'on' LIMIT 5;


Best practice going forward: Create a second admin account while you are logged in. If one account breaks, you always have a fallback — no more database access needed.

Community Replies

K
koicodedev
The adpexzg3FUZAk hash is the old vtiger 5.x default. On Vtiger 7+ with crypt_type = '' it actually works as a plain comparison. After logging in, go to My Profile → Change Password immediately.
A
alexchen Accepted answer
Confirmed working on Vtiger 8.3 as well. The crypt_type = '' step is essential — without it the login module tries to hash the stored value again and you get invalid credentials even with the right password.
← Back to General Join to answer →