How to reset Xray’s admin password?
Subject
How to reset the 'admin' user in JFrog Xray?
Instructions
In order to reset the password for the admin user inXray(when Artifactory is configured as the Authentication Provider), you need to connect to the MongoDB and manually change it.
Docker installation:
1 – Connect to mongoDB container:docker exec -it
2 – Connect to mongo DataBase:mongo -u xray –authenticationDatabase xray –authenticationMechanism SCRAM-SHA-1 -p password(when using the default DB (not externalized DB) the schema name is 'xray')
3 – Switch to Xray DB :使用x光
4 – Change admin password :db.getCollection('users').update({name: "admin"},{$set: {password:"SaltedPassword"}});
The default Xray Admin password is this Salted Password: ""qCjYNYARDMbIOcYf6fAJYEI04vAeeJjSy/WIfNv1LV0=""
5 – Open Xray UI and verify you can login with user: ’admin' , password:
Non-docker installation:
1 – Connect to mongo DB
2 – Switch to Xray DB :使用x光
3 – Change admin password :db.getCollection('users').update({name: "admin"},{$set: {password:"SaltedPassword"}});
4 – Open Xray UI and verify you can login with user: ’admin' , password: ’updatedPassword’
