Stash - Create System Administrator user from MySQL console

Ivan Varbanov December 31, 2013

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

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 31, 2013

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

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 31, 2013

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
TAGS
AUG Leaders

Atlassian Community Events