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 Join to answer
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...

714 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot