- JIRA 6.x Administration Cookbook
- Patrick Li
- 438字
- 2021-12-08 12:37:31
Resetting the JIRA administrator password
Sometimes, you might forget or lose the password to the account with the JIRA Administrator or JIRA System Administrator permission, and you cannot retrieve it using the password-reset option. For example, suppose JIRA does not have an SMTP server configured, or you are restoring JIRA from a data dump and do not know the account and/or password. In these cases, you need to reset the administrator password directly in the database.
Note
This recipe only applies to JIRA instances that use the default internal user directory option. External user management such as LDAP will not work with this recipe.
Getting ready
Since we will reset the password in JIRA's database, make sure you do the following:
- Connect to the JIRA database either via the command line or a GUI
- Update the JIRA database records
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, wherejirauser
is the username to access the JIRA database.Tip
You can find JIRA's database details from the
dbconfig.xml
file located atJIRA_HOME
. - Change to the JIRA database by running the
use jiradb
command, wherejiradb
is the name of JIRA's database. - Determine the groups that have the JIRA System Administrators global permission with the following SQL statement:
select perm_parameter from schemepermissions where PERMISSION=44;
- Find users that belong to the groups returned in step 3 using the following SQL statement, where
jira-administrators
is a group returned from step 3:select child_name, directory_id from cwd_membership where parent_name='jira-administrators';
- Reset the user's password in the database with the following SQL statement, where
admin
is a user returned in step 4:update cwd_user set credential='uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==' where user_name='admin';
- Restart JIRA to apply the change.
How it works…
With JIRA's internal user directory, all the user and group data are stored in the JIRA database. The value 44
is the ID for the JIRA System Administrators global permission.
If you do not know what groups or users have been granted the JIRA System Administrators global permission, we will first have to find this information using steps 3 and 4. Otherwise, you can skip to step 5 in order to reset the password.
JIRA's user password information is stored in the cwd_user
table. Since JIRA only stores the hash value of the password, we changed the user's admin
password to uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==
, which is the hash value of sphere
.
- 審計全流程技術操作實務指南
- 金融科技(FinTech)發展的國際經驗和中國政策取向(中國金融四十人論壇書系)
- 汪博士詳解PMP?模擬題(第4版)
- Learning Informatica PowerCenter 9.x
- 陜西文物年鑒·2015
- Learning Microsoft Azure
- 審計全流程實操從入門到精通
- 中國政府統計問題研究
- 成功通過PMP(第3版)
- 內部審計情景案例:理解審計行為,辨析審計決策
- Managing Virtual Infrastructure with Veeam? ONE?
- 2014年注冊會計師(CPA)全國統考專用輔導教材系列:審計(名師解讀版)
- Windows Server 2016 Administration Fundamentals
- 審計實務
- 合規型內部審計:精準發現違規行為,實時化解合規風險