Stash - Create System Administrator user from MySQL console


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...

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.



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?



Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,739 views 1 5
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