Lost access to master/other accounts, won't accept new passwords

I’ve installed a fresh server. Transferred some data and have now realised that master and other account passwords are not working. I have changed them but still do not login.

I’ve also tried deleting QuickBox folder and re-installing but have same issue.

Does anybody know how I can get master account working again without starting a fresh install on the server? I have transferred quite a bit of data and would rather not start again if I can help it.

TIA