Resetting Artifactory Admin Password

If you’ve lost access to the administrator account in your on-premised Artifactory, this guide will help walk you through setting it back up. You’ll need to have SSH access to the server in order to complete this guide.

To get started, SSH into the server and open$ARTIFACTORY_HOME/etc/security/access/bootstrap.creds. Enter the following information:

access-admin@127.0.0.1=YOUR_PASSWORD

Now assign read/write permissions:

chmod 600 bootstrap.creds

And finally, restart the server.

Once that’s done, you’ll need to generate the Basic authorization header:

echo -n access-admin:YOUR_PASSWORD | base64

Then make the following POST call while still SSHed into the server:

curl --request PATCH \
  --url http://localhost:8081/artifactory/api/access/api/v1/users/admin \
  --header 'authorization: Basic <USE_CODE_FROM_ABOVE>' \
  --header 'content-type: application/json' \
  --data '{"password":"NEW_PASSWORD"}'

If you receive a response like the following, you’re all set:

{
  "username" : "admin",
  "realm" : "internal",
  "status" : "enabled",
  "allowed_ips" : [ "*" ],
  "created" : "2019-08-01T13:47:16.959Z",
  "modified" : "2019-09-04T15:25:02.398Z",
  "last_login_time" : "2019-08-21T13:46:55.061Z",
  "last_login_ip" : "204.194.141.30",
  "custom_data" : {
    "updatable_profile" : "true",
    "artifactory_admin" : "true"
  },
  "password_expired" : false,
  "password_last_modified" : 1567610702390,
  "groups" : [ ]
}

2 thoughts on “Resetting Artifactory Admin Password”

    1. I updated the post to include more specific directions – try creating a auth header:

      echo -n access-admin:YOUR_PASSWORD | base64

      Then run the same cURL command from above using the code generated.

Leave a Reply

Your email address will not be published. Required fields are marked *