上QQ阅读APP看书,第一时间看更新
How to do it...
Let's assume we use the default mysql command-line tool and MySQL as the backend database for Jira. If you are using a different database, you may need to change the following SQL statements accordingly:
- Connect to the Jira database with a client tool by running the mysql -u jirauser -p command, where jirauser is the username used by Jira to access the Jira database.
- You can find Jira's database details from the dbconfig.xml file located in JIRA_HOME.
- Change to the Jira database by running the use jiradb command, where jiradb is the name of Jira's database.
- Determine the groups that have the Jira System Administrator global permission with the following SQL statement:
select perm_parameter from schemepermissions where PERMISSION=44;
- Find users that belong to the groups returned in the previous step by running the following SQL statement, where jira-administrators is a group returned from the previous step:
select child_name, directory_id from cwd_membership where parent_name='jira-administrators';
The jira-administrators group is the default group that administrators belong to. You might get a different group if you customize the permission configurations. The table column for the username is child-name.
- Reset the user's password in the database with the following SQL statement, where admin is a user returned in the previous step:
update cwd_user set credential='uQieO/1CGMUIXXftw3ynrsaYLShI+ GTcPS4LdUGWbIusFvHPfUzD7 CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==' where user_name='admin';
- Restart Jira to apply the change.