Koozali.org: home of the SME Server

What to do if you delete the admin account via phpMyAdmin

pearless

What to do if you delete the admin account via phpMyAdmin
« on: June 13, 2007, 11:20:25 AM »
Here is a summary of what you need to do if you accidentally delete the admin account using phpMyAdmin.

(1) you need to logon to your server, either via the console or via a remote access tool like putty as the root account.
(2) enter
Code: [Select]

passwd admin

and when prompted enter in your new password and then you will be prompted to re-enter it again to verify it. At this point you will again be able to access the server-manager panel in SME, now to fix phpMyAdmin...
(3) uninstall phpMyAdmin by then going:
Code: [Select]

yum remove smeserver-phpmyadmin-multiuser-2.10.1-1

(Noting you need to change the version to the one you have installed)
Then you need to
Code: [Select]

signal-event post-upgrade; signal-event reboot

to fully remove the rpm, noting that your server will sit there for a while and then reboot.
Log back on as root and reinstall by going (Note I had previous downloaded the rpm so I used the localinstall option):
Code: [Select]

yum localinstall smeserver-phpmyadmin-multiuser-2.10.1-1.noarch.rpm

And now you will be back where you were BEFORE you deleted your admin account!