How can I unlock my admin account if it gets locked?
(Use the following document to access the database: How to access the database in OnApp )
To unlock the admin user account, open the OnApp database in MySQL and run:
update users set locked_at=NULL, unlock_token=NULL, failed_attempts=0 where id=1;
The admin user is typically ID 1, but this can be changed to unlock other users as well.
It is preferable to unlock accounts via the e-mail which is sent out by the control panel server to the user's registered account. However, the workaround in this article will help in situations when that is not available.
Requires an update
We can use rake task instead
cd /onapp/interface; rake onapp:unlockuser[admin]
or we can execute it from root
su - onapp -c "cd /onapp/interface; rake onapp:unlockuser[admin]"