0

i have installed latest version of Artifactory Pro (5.8.3) on Centos7. The default admin credentials are admin/password. i want to change the password through command-line but unable to do so. Does any one has any inputs how to do this?

Following troubleshootings i tried:

  1. jfrog rt c rt-server-1 --url=http://domain/artifactory --user=admin --password=password ... nothing happens , when i try to use a new password i get 401: unauthorize error

  2. jfrog guide tells to generate security.xml and add the hash code of the new password but security.xml does not get generated even after following all their steps.

  3. also tried to use curl commands but no use.

If any one has gone through similar issue please share your findings. let me know if you need more info.know on case

akshay
  • 61
  • 1
  • 4

1 Answers1

4

JFrog CLI currently does not support changing of a user's password. the CLI config method you were using simply lets you configure your server and credentials to be used by other CLI command later.

What you can do is use a simple curl command to invoke the change password API as described here.

specifically, in your example changing the Admin's password to "NewPassword" will be something like:

curl -X POST -u admin:password -H "Content-type: application/json" -d '{ "userName" : "admin", "oldPassword" : "password", "newPassword1" : "NewPassword", "newPassword2" : "NewPassword" }' http://yourartifactory:8081/artifactory/api/security/users/authorization/changePassword
Ortsigat
  • 1,259
  • 7
  • 8