KB Article #180473
How to reset the admin super user password in API Portal
Problem
If locked out of the Joomla "admin" super user account and a reset password has become necessary
- this is possible using the following methods :-
Resolution
The procedure is detailed on the Joomla site How do you recover or reset your admin password?
API Portal specific steps
Method 1
If it is possible to login to another account and terminal access to the API Portal host is available then this method should work :-
Add the following line at the bottom of /opt/axway/apiportal/htdoc/configuration.php
public $root_user='myname';
Where myname is user with the known password.
Now login to the myname user in the "Users" page on the left (/administrator/index.php?option=com_users) it should be possible to reset the password of the original admin super user. Don't forget to remove this line from configuration.php when you have password successfully reset.
Method 2
We need to add a new super user which can be done through the mysql database.
Run the mysql client with your mysql admin user e.g.
$ mysql -u portal -p
# select your database (mine is "joomla")
mysql> use joomla;
# insert new user "admin2" with password "secret" into our users table
mysql> insert INTO s8f7h_users
-> (`name`, `username`, `password`, `params`, `registerDate`, `lastvisitDate`, `lastResetTime`)
-> VALUES ('Administrator2', 'admin2',
-> 'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '', NOW(), NOW(), NOW());
Query OK, 1 row affected (0.03 sec) # Make it a super user group "8" mysql> insert INTO s8f7h_user_usergroup_map (`user_id`,`group_id`) -> VALUES (LAST_INSERT_ID(),'8'); Query OK, 1 row affected (0.00 sec)
Login to Joomla /administrator page with the new user "admin2" with password "secret"
Click "Users" on the left (/administrator/index.php?option=com_users)
Click on our admin "Super User"
Change the password and save
Check login with the "admin" and newly saved password
Remove admin2 user from the list as necessary