- JIRA 7 Administration Cookbook(Second Edition)
- Patrick Li
- 474字
- 2021-07-16 10:48:08
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 restore 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.
Getting ready
As 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
- Update the JIRA database
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 used by JIRA to access the JIRA database. - You can find JIRA's database details from the
dbconfig.xml
file located inJIRA_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 4 by running the following SQL statement, where
jira-administrators
is a group returned from STEP 4: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 5:
update cwd_user set credential='uQieO/1CGMUIXXftw3ynrsaYLShI+ GTcPS4LdUGWbIusFvHPfUzD7 CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==' 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 is stored in the JIRA database. The value 44 is the ID of the JIRA System Administrators global permission.
If you do not know which groups or users are granted the JIRA System Administrators global permission, we will first have to find this information using STEP 4 and STEP 5. Otherwise, you can skip to STEP 6 in order to reset the password.
JIRA's user password information is stored in the cwd_user
table. As JIRA only stores the hash value of the password, we changed the user's admin password to uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==
, which is the UTF-8-encoded hash value of sphere.
- Mastering OpenLayers 3
- C語言程序設(shè)計實踐教程(第2版)
- Web前端開發(fā)技術(shù):HTML、CSS、JavaScript(第3版)
- WebAssembly實戰(zhàn)
- 零基礎(chǔ)學(xué)Scratch少兒編程:小學(xué)課本中的Scratch創(chuàng)意編程
- Java Web及其框架技術(shù)
- Spring Cloud、Nginx高并發(fā)核心編程
- Ray分布式機器學(xué)習(xí):利用Ray進行大模型的數(shù)據(jù)處理、訓(xùn)練、推理和部署
- Learning Data Mining with R
- Visual Basic程序設(shè)計上機實驗教程
- Raspberry Pi Robotic Blueprints
- 從程序員角度學(xué)習(xí)數(shù)據(jù)庫技術(shù)(藍橋杯軟件大賽培訓(xùn)教材-Java方向)
- 計算機應(yīng)用基礎(chǔ)(第二版)
- Java EE架構(gòu)設(shè)計與開發(fā)實踐
- 人人都能開發(fā)RPA機器人:UiPath從入門到實戰(zhàn)