dependency-track
dependency-track copied to clipboard
Reset admin password documentation
Current Behavior
I was not able to find the documentation to reset the admin password.
Proposed Behavior
Document how to generate a ManagedPassword.
IF you are interested I could integrate the project documentation e.g., inserting the following example python script that does the job
from hashlib import sha512
import bcrypt
password = input("password: ")
prehash = sha512(password.encode()).hexdigest().encode()
salt = bcrypt.gensalt(rounds=14, prefix=b'2a')
phash = brcrypt.hashpw(prehash, salt)
print(phash)
Checklist
- [X] I have read and understand the contributing guidelines
- [X] I have checked the existing issues for whether this enhancement was already requested
Thanks a lot for your help. I was able to reset a lost dependency-track admin password thanks to your help. Still, I would like to mention a few mistakes in above script:
- Line 0: the above Python required bcrypt module:
pip install py-bcrypt - Line 5: the bcrypt.gensalt() function only takes one argument, and no = statement in the args.
- Line 6: typo "bcrypt"
Here is what worked for me:
pip install py-bcrypt
python3
from hashlib import sha512
import bcrypt
password = input("password: ")
prehash = sha512(password.encode()).hexdigest().encode()
salt = bcrypt.gensalt(14)
phash = bcrypt.hashpw(prehash, salt)
print(phash)