Stash - Create System Administrator user from MySQL console

Hello,

by mistake we delete the system administrator account and we don't have another one. Currently we have only Administrator account. Setup is Stash + LDAP/AD Integration + Internal Stash groups where we placed users from AD.

How can I create a new user from MySQL or how can I recreate the System Administrator account? It's in production and I wan't to avoid reinstallation or anything like that. There should be a way somehow to create that user in MySQL. Can you please provide me how I can accomplishe this?

Thank you

1 answer

Hi Ivan,

Does anything on this page help? Make sure you back up the database before making any manual changes, just in case...

https://confluence.atlassian.com/display/DOC/Restoring+Passwords+To+Recover+Admin+User+Rights

The only other table that is Stash specific is STASH_USER, which has it's own id and the username (and slug which should be the same).

Otherwise if you get stuck or you're not sure you should definitely raise a support ticket so that we can help you that way as well.

Cheers,

Charles

The other possibility is granting your admin 'sysadmin' rights. The table is STA_GLOBAL_PERMISSION and the user id column will match/join with STASH_USER. Admin has the value '6' and sysadmin has the value '7'. You could change that too if that helps?

Cheers,

Charles

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

421 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you