Tutorial - iTOP Password Recovery
In our example, we are using MySQL as the database service for iTOP.
First, we need to access the MySQL server as root user.
Use the following command to install the required packages.
# apt-get update
# apt-get install mysql-client
Use the following command to login the MySQL server as root.
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 17226
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
The system will ask you to enter the root user MySQL password.
After entering the password, we need to find the User ID number of the administrative user.
In our example, the iTOP administrative user account is named: admin
Use the following MySQL commands to detect the iTOP admin user ID number.
Copy to Clipboard
mysql> use itop;
mysql> select * from priv_user;
+----+-----------+-------+----------+---------+------------+
| id | contactid | login | language | status | finalclass |
+----+-----------+-------+----------+---------+------------+
| 1 | 1 | admin | EN US | enabled | UserLocal |
+----+-----------+-------+----------+---------+------------+
select * from priv_user;
mysql> use itop;
mysql> select * from priv_user;
+----+-----------+-------+----------+---------+------------+
| id | contactid | login | language | status | finalclass |
+----+-----------+-------+----------+---------+------------+
| 1 | 1 | admin | EN US | enabled | UserLocal |
+----+-----------+-------+----------+---------+------------+
In our example, we were able to detect that the Admin user account has the identification number: 1.
Use the following MySQL commands to reset the iTOP admin user password.
Copy to Clipboard
mysql> use glpi;
mysql> update itop.priv_user_local set password_hash='$2y$10$vRSLaXl12M7Y70Ucf6KbLuzb.tZbeypqKyZHXWkjgeJCrPYfFwv9a' where id = 1;
mysql> quit;
mysql> use glpi;
mysql> update itop.priv_user_local set password_hash='$2y$10$vRSLaXl12M7Y70Ucf6KbLuzb.tZbeypqKyZHXWkjgeJCrPYfFwv9a' where id = 1;
mysql> quit;
In our example, we changed the admin user password to admin.