Maybe it would help if you provide the details on what type of system this pertains to. It's nearly impossible to give an answer with the information you provided, for all what we know it could be any type of system. Please provide more details on what you have done, what system type it is and the problem you encounter.
You can reset the password of the gui admin from CLI using *utils reset_ui_administrator_password*
You can't change it to the old one immediately as cucm won't accept same password when you change. You can change to a temp password then change back to the original one.
To disable lockout, create a custom credential policy (user management > user settings > cred policy). In this policy select the option 'No Limit for failed logons'. Next go to application users > admin > edit credential > assign the new custom cred policy
Instead of allowing unlimited instances of failed logins I would recommend you to look into what is causing the failed logins as this is not normal. One might argue that setting this up as suggested would be a breach of security, or at least a welcome to try to gain access with not much to stop it.