Reset Jamf cli tools configuration pwd?

Taylor_Armstron
Valued Contributor

I don't use the cli tools often, and when trying to check something today, I'm being prompted for the configuration password but none of my documented passwords are being accepted.

Is there a quick and simple way to delete the cli configuration and set a new password? I believe the only thing I had set was a scheduled backup, which appears to have not been running correctly, so attempting to get in there to check it but unable to do so at the moment.

8 REPLIES 8

brandon_roehl
New Contributor
New Contributor
$ jamf-pro config encrypt forgot-password

Is what you are looking for.
This can happen on older versions of the CLI tools incorrectly calculating the key if none where set. You may want to also try upgrading to the latest using the package managers as described in Using the Jamf Pro Server Tools Command-Line Interface

Taylor_Armstron
Valued Contributor

Just wanted to say a belated "thank you" @brandon.roehl . Finally got some time to get back to it, and worked like a charm.

atrystan
New Contributor III

I ran into a situation in which resetting the password would work until the following time you launched server-tools.jar. Not sure what the cause was, but have seen it happen during upgrade--very annoying. I contacted support about it and was given this info, which really fixes it for me:

If you want create a new configuration password you'll need to delete the yaml.tool file otherwise it not work.

( https://docs.jamf.com/technical-articles/Configuring_the_CLI.html )

On Windows, the configuration file is stored in the following locations:

User-based location (default): %LOCALAPPDATA%\Jamf\tools.yaml A typical path is: C:\Users\<username>\AppData\Local\Jamf\tools.yaml

Global location (optional): %ProgramData%\Jamf\tools.yaml A typical path is: C:\ProgramData\Jamf\tools.yaml

 

Delete that file, re-enter the server info, and never worry about it again.

Hi there,

Do I run this command and then delete the tools.yaml file? i am on a windows system, does the same command apply to that? if so do i change the path to any directory? I'm also trying to get into the CLI but unable to without the config pwd.

 

$ jamf-pro config encrypt forgot-password

atrystan
New Contributor III

Sorry that I never saw your response! I never found that command to be helpful. Even if you reset your password, the server tools will never allow it to work on the following launch. The command may work on Linux hosts, but does not on Windows hosts.

In my case, and over a period of a couple years with perhaps a dozen upgrades to different servers completed, it has never functioned for me. Instead, the file deletion I detailed above seems to be the only thing that helps me.

Discher
New Contributor III

For Windows Server, delete the file: C:\Users\<username>\AppData\Local\Jamf\tools.yaml

Then from a command prompt run:

  • jamf-pro config set --database-name dataBaseNameGoesHere
  • jamf-pro config set --database-user dataBaseUserNameGoesHere
  • jamf-pro config set --database-password dataBasePasswordGoesHere
  • jamf-pro config list (shows the information from DataBase.xml)

Relaunch server-tools.jar

This is the way.

atrystan
New Contributor III

I have to say--I wasn't convinced, but that does work. Thank you. Sad that Jamf does not document this anywhere at all, and even their support staff is apparently unaware.

atrystan
New Contributor III

In the end, this didn't work for us. It still pops up and asks for a configuration password, even if you don't have one.