This page has instructions for doing a database-level user password reset in JIRA and Confluence (and other Crowd-library-using applications).There's two things to try before messing with password hashes in the database:
- Click the 'Can't access your account?' link on the login screen
..and wait at least a minute (for the JIRA mail queue to flush). This won't work if your account has a bogus email address, or your JIRA mail server is unconfigured. - Ask another administrator to reset your password via the admin interface. Not an option if you are the only administrator.
If none of these steps worked for you, it's time to poke around in the database
Compute a hash of a new password. For example:
$ sudo pip3 install passlib $ python3 -c 'from passlib.hash import atlassian_pbkdf2_sha1; print(atlassian_pbkdf2_sha1.hash("hunter2"));' {PKCS5S2}sFaqFaJUijGG0FqLUQrhPOEXrxB7jrXI7lzkPstbM3bhPq7x8rSS+Q3NtSduIgwt
(thanks to https://eikonal.wordpress.com/tag/authenticator/)
Print and save the original password hash somewhere, just in case you need to restore it:
jira=> select id, user_name, credential from cwd_user where user_name='admin'; ┌───────┬───────────┬───────────────────────────────────────────────────────────────────────────┐ │ id │ user_name │ credential │ ├───────┼───────────┼───────────────────────────────────────────────────────────────────────────┤ │ 10000 │ admin │ {PKCS5S2}Ba+7BCXolbe7oFyBuSISlh9ayhodhmqpXpYMNw5/Ky7YlHIbnDp+qgRuv4vqGrE6 │ └───────┴───────────┴───────────────────────────────────────────────────────────────────────────┘ (1 row)
Set the new password:
jira=> update cwd_user set credential='{PKCS5S2}sFaqFaJUijGG0FqLUQrhPOEXrxB7jrXI7lzkPstbM3bhPq7x8rSS+Q3NtSduIgwt' where user_name='admin' returning credential; ┌───────────────────────────────────────────────────────────────────────────┐ │ credential │ ├───────────────────────────────────────────────────────────────────────────┤ │ {PKCS5S2}sFaqFaJUijGG0FqLUQrhPOEXrxB7jrXI7lzkPstbM3bhPq7x8rSS+Q3NtSduIgwt │ └───────────────────────────────────────────────────────────────────────────┘ (1 row) UPDATE 1
- Restart JIRA.