We have two ways to do it:
1. We have official procedure for resetting adminuser but it's working correctly starting from SP5.
2. If you don't have yet SP5 or you're unable to use above recommended way then:
update console.PASSWORD set ENCODED_PASSWORD = '$2a$07$ld60XoN7s54uK6BcP4LmF.pdAt6hE1aaK6P39dVyV3zLS3eW3Tp7C' where PASSWORD_ID = (Select TOP 1 PASSWORD_ID from console.password where SECURITY_PRINCIPAL_ID = (Select SECURITY_PRINCIPAL_ID from console.SECURITY_PRINCIPAL where PRINCIPAL_NAME = 'adminuser') order by CREATION_DATE desc)
This method is not recommended and use it only if you have to.