How to Retrieve VICIdial Admin Password from MySQL Database

Losing or forgetting the VICIdial admin password is a common issue, especially when systems are handed over between teams or managed by multiple administrators. Fortunately, VICIdial stores user credentials in its MySQL database, and an administrator with server access can retrieve or reset the password directly from the database.

This article explains how to retrieve the VICIdial admin user password using MySQL, along with important security notes and best practices.


Prerequisites

Before proceeding, ensure you have:

  • SSH access to the VICIdial server
  • MySQL root or database administrator credentials
  • Permission to access the asterisk database
  • Basic knowledge of Linux command line

Important: This method should only be used on systems you own or are authorized to manage.


Step 1: Log in to the VICIdial Server

Connect to your VICIdial server using SSH:

ssh root@your_vicidial_server_ip

Step 2: Log in to MySQL

If your MySQL root user has no password:

mysql -u root

If your MySQL root user has a password (most systems do):

mysql -u root -p

You will be prompted to enter the MySQL root password.


Step 3: Select the VICIdial Database

VICIdial stores all configuration and user data in the asterisk database.

USE asterisk;

Step 4: Retrieve VICIdial User Passwords

Run the following query to list all VICIdial users and their passwords:

SELECT user, pass FROM vicidial_users;

Example Output

+----------+----------+
| user     | pass     |
+----------+----------+
| admin    | 1234     |
| manager  | test123  |
| agent001 | agentpw  |
+----------+----------+
  • The user column shows the VICIdial username
  • The pass column shows the password (usually stored in plain text on older versions)

Look for the admin user to retrieve the admin password.


Step 5: Log in to VICIdial Admin Panel

Open your browser and access the VICIdial admin URL:

http://your_server_ip/vicidial/admin.php

Use the retrieved username and password to log in.

Optional: Reset the Admin Password (Recommended)

If you prefer to reset the password instead of using the old one, run:

UPDATE vicidial_users 
SET pass='NewStrongPassword123' 
WHERE user='admin';

Then exit MySQL:

EXIT;

Use the new password to log in.


Security Considerations (Very Important)

  • Older VICIdial versions store passwords in plain text, which is insecure
  • Restrict MySQL and SSH access to trusted administrators only
  • Change the admin password immediately after recovery
  • Avoid using simple passwords like 1234 or admin
  • Consider limiting database access via firewall rules

Troubleshooting Tips

  • Access denied to MySQL
    • Verify MySQL root password
    • Check /etc/my.cnf or /etc/mysql/my.cnf
  • No admin user found
    • Run: SELECT user FROM vicidial_users;
  • Login still fails
    • Clear browser cache
    • Verify correct VICIdial URL
    • Check Apache and MySQL services are running

Conclusion

Retrieving a VICIdial admin password directly from the MySQL database is a straightforward process when you have proper server access. However, for security reasons, it is always best to reset the password immediately and follow strong credential management practices.

This method is invaluable for system recovery, audits, and inherited systems where credentials are missing.

This entry was posted in Vicidial and tagged , , , , , , , , . Bookmark the permalink.