Recover or Reset Admin account password in OSTicket

So you have locked yourself out of your OSTicket installation and you want to reset or recover your password. First of all the password is stored in a md5 encrypted state, and really isn’t recoverable, but you can easily change it to something that you do know. It honestly amazes me how many times I have had to answer this question over on, so it seemed to me that perhaps its worth mentioning here.

The first account created in the database is always the Admin account. To reset it you will need to have some way of editing the database directly by issuing SQL queries. There are a number of 3rd party pieces of software that will let you do this if you cannot get at the CLI. I personally use MySQL Administrator or MySQL Workbench (both from However when I cannot SSH or RDP into the server I also use Navicat. Regardless of how you personally want to get there you can issue the following query to change your password:

update ost_staff set passwd = md5('yournewpassword') where staff_id='1';

Make sure that you change yournewpassword to what you want the password to be. Also if your not sure however that is the account you want to reset have no fear you can reset passwords using the username or email.


update ost_staff set passwd = md5('yournewpassword') where username='admin';


update ost_staff set passwd = md5('yournewpassword') where email='';

As before make sure you tailor the query to match your username or email, and the actual passwords.

Regardless of which method you use success means you will not only see something like:

Affected Rows: 1
Time: 0.002mx

But you will also be able to log into your OSTicket installation again.