Skip to main content
Jamf Nation, hosted by Jamf, is a knowledgeable community of Apple-focused admins and Jamf users. Join us in person at the ninth annual Jamf Nation User Conference (JNUC) this November for three days of learning, laughter and IT love.

Using the Jamf Pro Server Tools Command-Line Interface

Overview

Changelog

Note: Starting with CLI 2.2.7, the repositories are in a different location on Linux. If you installed the CLI using the package manager on Linux, you must run the commands provided in the “Upgrading from CLI 2.2.6 or Earlier on Linux” section below to move the repositories to the new location.

This article describes how you can perform the following tasks using the Jamf Pro Server Tools command-line interface (CLI):

  • Configure the CLI
  • Start, stop, and restart Jamf Pro's Tomcat server
  • Start, stop, and restart the MySQL server

After you have configured the CLI, you can also perform the following tasks:

Versions Affected

The CLI works with on-premise installations of Jamf Pro 10.0.0 or later.

Installing the CLI

The Jamf Pro Server Tools CLI is provided using the following methods:

  • Bundled with the Jamf Pro installers (Jamf Pro 10.7.0 or later)
  • Package managers (homebrew, apt, and yum)
  • Manual download:
    • Command line
    • Browser

Jamf Pro Installers (Jamf Pro 10.7.0 or later)

You can find the CLI in the following "bin" directory of the Jamf Pro installation for your platform:

  • Mac: /Library/JSS/bin/jamf-pro
  • Linux: /usr/local/jss/bin/jamf-pro
  • Windows: C:\Program Files\JSS\bin\jamf-pro.exe

Note: You can copy the jamf-pro binary to other servers in your environment if you want to use the CLI on a different server. The MySQL binaries must be installed on the same server as the CLI for the CLI to function.

Downloading the CLI Using a Package Manager

You can download and install the CLI by executing the following commands for your platform from a command prompt.

Initial Installation

Mac
brew tap jamf/tap
brew update
brew install jamf-pro
Red Hat Enterprise Linux
rpm --import https://archive.services.jamfcloud.com/gpg-public-key.asc
yum-config-manager --add-repo=https://archive.services.jamfcloud.com/rpm/
yum install jamf-pro-server-tools
Ubuntu
wget -qO - https://archive.services.jamfcloud.com/gpg-public-key.asc | sudo apt-key add -
add-apt-repository 'deb https://archive.services.jamfcloud.com/deb stable main'
apt update
apt install jamf-pro-server-tools

Upgrading from CLI 2.2.6 or Earlier on Linux

Starting with CLI 2.2.7, the location of the repositories was changed for Linux. If you are upgrading from CLI 2.2.6 or earlier on Linux, you must run the following commands instead of the commands listed above to move the repositories to the new location.

Red Hat Enterprise Linux

Execute the following commands to move the repositories to the new location:

rm /etc/yum.repos.d/archive.servers.jamfcloud*.repo
yum-config-manager --add-repo=https://archive.services.jamfcloud.com/rpm/
yum update
Ubuntu

Execute the following commands to move the repositories to the new location:

add-apt-repository --remove 'deb https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/deb stable main'
add-apt-repository 'deb https://archive.services.jamfcloud.com/deb stable main'
apt update

Downloading the CLI Using a Command Line

To download the CLI manually, execute one of the following commands for your platform from a command prompt.

Note:

  • The CLI binary file will download to the current directory. Before downloading the CLI, navigate to the directory where you want to download it. Otherwise, you will need to manually move the CLI after download.
  • On Linux and Mac platforms, it is recommended to place the CLI binary in a directory on the system path, such as /usr/local/bin, to avoid needing to specify the full path when using the CLI.

Linux

64-bit versions
wget https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/latest/linux/x64/jamf-pro
32-bit versions
wget https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/latest/linux/x86/jamf-pro

Mac

curl -O https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/latest/macos/x64/jamf-pro

Windows PowerShell

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/latest/windows/x64/jamf-pro.exe -OutFile jamf-pro.exe

Note: You can replace "latest" in the above URLs with a specific version. To browse available files and versions, see the following webpage:
https://archive.services.jamfcloud.com

Downloading the CLI Using a Browser

To manually download the CLI binary for your platform from a browser, go to the following webpage:
https://archive.services.jamfcloud.com/#jamf-pro-server-tools/release/latest/

Procedures

Linux and Mac "sudo" Notice

On Linux and macOS, some CLI commands may require sudo. If you receive an error similar to jamf-pro: command not found, the sudo path may not be configured properly. To resolve this issue, run sudo using the full path to the jamf-pro binary. For example:

Linux:

sudo /usr/local/jss/bin/jamf-pro server restart

Mac:

sudo /Library/JSS/bin/jamf-pro server restart

Configuring the CLI

You can configure default database settings by executing the following command followed by at least one of the database configuration flags listed below:

jamf-pro config set

Configuration flags:

--database-host
--database-port
--database-name
--database-user
--database-password
--backup-dir

For example, you can set the database password by executing the following command:

jamf-pro config set --database-password p@$$w0rd

Note:

  • Replace p@$$w0rd with your password. To prevent your password from being stored in the shell history, execute the following command, and enter your password when prompted: jamf-pro config set --database-password
  • If your password contains special characters, you may need to enclose the password within single quotes.
  • On Red Hat Enterprise Linux, the sudo command may not use the expected home directory. You may need to use the su command or the sudo su command to reach the root user account to set configuration options for jamf-pro. If you use the su command, you must provide the root user password. If you use the sudo su command, you can access the root user account by providing the password of the current account. Note that the current account must be configured in the sudoers file to use sudo su. After executing any jamf-pro config command to set configuration values, it is highly recommended that you execute the jamf-pro config list command to ensure the values you intended were saved.

Configuration File Permissions

On Linux and Mac, the permissions for the configuration file (located at $HOME/.jamf/tools.yaml) are read/write for only the file owner (i.e., rw-------, or mode 600).

Configuration File Location

Windows

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

Mac and Linux

On Mac and Linux, the configuration file is stored in the following locations:

  • User-based location (default): $HOME/.jamf/tools.yaml
  • Global location (optional): /etc/jamf/tools.yaml

Global Location

You can use the global location to make the CLI configurations available to all users. To use the global location, you must manually move the tools.yaml file to the global location listed for your platform above.

Warning: The tools.yaml file is not encrypted by default. Moving the tools.yaml file to a global location will make it accessible to all user accounts. If you move the tools.yaml file to a global location, it is recommended that you enable encryption by executing the following command: jamf-pro config encrypt set-password. For more information, see “Full Encyption” below.

Security Mechanisms

Default Security

The default security mechanism allows commands to be run without prompting for settings or passwords. Database connection settings remain secure and can be used in scripted or automated scenarios like scheduled backups.

By default, two layers of security are used to secure configuration settings:

  1. The configuration file permissions must be read/write for only the current user. If insecure permissions are detected, commands will not execute and an error will be displayed.
  2. All database fields in the configuration file are encrypted using a default key. This is the same level of security MySQL uses for protecting its login configuration settings.

Warning: Configuration settings saved using the default encryption key are not encrypted; they are merely obfuscated. Obfuscation can deter attackers because it makes the settings difficult to read, however, the obfuscated settings provide no greater protection than if the settings were saved as plain text. For this reason, you should make sure the file permissions on the configuration file are always secured.

Full Encryption

For additional security, you can enable full encryption of the configuration file. This feature allows the configuration file to be fully encrypted using a custom encryption key (i.e., password) known only to you. You will then be prompted to enter that key anytime the configuration file needs to be read or updated, such as displaying the configuration with jamf-pro config list or backing up and restoring the database.

Note: Using full encryption requires you to enter your encryption key for each command. Automatic scheduled backups are not possible if full encryption is enabled.

To enable full encryption, execute the following command, and create an encryption key password when prompted:

jamf-pro config encrypt set-password

Note: Using this option, data at rest is fully encrypted using AES 256 encryption and a PBKDF2 key generated from the password.

Starting, Stopping, and Restarting the Jamf Pro Server

You can start, stop, and restart Jamf Pro's Tomcat server by executing the following commands:

jamf-pro server start
jamf-pro server stop
jamf-pro server restart

Starting, Stopping, and Restarting MySQL

You can start, stop, and restart MySQL by executing the following commands:

jamf-pro database start
jamf-pro database stop
jamf-pro database restart

Getting Help

You can get additional usage information about the CLI by executing the following command:

jamf-pro help

Using the --help flag with any jamf-pro subcommand will display usage information about that command.

Like Comment
Order by:
SOLVED Posted: by anverhousseini

Why is the binary missing in the "Jamf Pro Manual Installation" ZIP download?

Like
SOLVED Posted: by prbsparx

Does this support using SSL to connect to the database?

Like
SOLVED Posted: by retroroscoe

Is the database password the same as currently used for the jamfsoftware database?

Or is the root password?

Like
SOLVED Posted: by mhegge

Works with 10.0.0 or later, but where is it or where can it be obtained if you are not running 10.7 yet?

Like
SOLVED Posted: by prbsparx

@retroroscoe the --database-password should be the password used to connect to the jamfsoftware database.

Like
SOLVED Posted: by retroroscoe

tried to download on an Ubuntu Server and get an error saying... E: Unable to locate package jamf-pro-server-tools

Like
SOLVED Posted: by drhoten

Thanks for letting us know @retroroscoe, I'll share this with the development team tomorrow.

Like
SOLVED Posted: by sdagley

@prbsparx What flavor of *nix are you running? On my RHEL 6.8 I'm seeing that I have to configure the jamf-pro settings to use my root MySQL account for the backup command to work.

Like
SOLVED Posted: by drhoten

@retroroscoe Can you confirm that you ran all of three lines for installing the CLI on Ubuntu in our KB Using the Jamf Pro Server Tools Command-Line Interface and the repo is correctly listed in your installed packages?

Like
SOLVED Posted: by ryan.ball

@drhoten In Ubuntu 18.04, the following line:

add-apt-repository 'deb https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/deb stable main'

Adds the following in /etc/apt/sources.list:

deb https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/deb stable main
# deb-src https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/deb stable main

But as @retroroscoe said, even after updating packages from the repositories, jamf-pro-server-tools is not available. This might be a misconfiguration of the repository.

Like
SOLVED Posted: by drhoten

Thanks @ryan.ball, I'll make sure the team looks at this issue.

Update: Question for you. Are you running on a 32-bit or 64-bit version of Linux?

Like
SOLVED Posted: by ryan.ball

@drhoten 64bit

Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic
Like
SOLVED Posted: by drhoten

Hello @ryan.ball can you try re-running the following commands to see if it resolves your issue and let us know what you see?

curl https://archive.services.jamfcloud.com/gpg-public-key.asc | sudo apt-key add -

and then

apt update
apt install jamf-pro-server-tools
Like
SOLVED Posted: by ron.heck

This article has been updated as follows:

  • Added MySQL binary requirements when the CLI is copied to a different server
  • Added paths to download the 64-bit and 32-bit versions of the CLI for Linux
Like
SOLVED Posted: by dmw3

After installing the tools on RHEL 6.9 running the command "jamf-pro database stop", came back with the following error:

failed to stop the database Error: fork/exec /bin/systemctl: no such file or directory
Like
SOLVED Posted: by drhoten

Thanks for reporting the issue of stopping MySQL on older versions of RHEL @dmw3, we are aware of the issue and are currently working on a fix that will be included in the next release of the Jamf Pro Server Tools.

Like
SOLVED Posted: by ryan.ball

@drhoten Still get "E: Unable to locate package jamf-pro-server-tools".

Like
SOLVED Posted: by drhoten

Thanks for the update @ryan.ball, I'll pass that along to the team and will continue to investigate it.

Like
SOLVED Posted: by diradmin

How is Jamf communicating updates concerning the Jamf Pro Server Tools CLI?

I have servers running 10.7.1, with tools reported as 1.0.0-SNAPSHOT. However, upon checking for updates, I see that there is a version 1.1.3 available.

Like
SOLVED Posted: by drhoten

We've not settled on the best way to do that yet @stephen.perry-GS, our first thought is to add a note to the top of this KB with the current version so folks are alerted when it's updated. Do you have other thoughts or suggestions?

Like
SOLVED Posted: by diradmin

@drhoten That method would work just fine for us. I know I just finished calling out the required access to *.jamfcloud.com, however, are there future plans to include the ability within the binary to check for (and potentially download) updates?

Like
SOLVED Posted: by drhoten

@stephen.perry-GS Great, I'll make sure this KB gets updated. Since checking for a new version of the CLI is built into the package managers, it is not something we are actively looking considering but checking for updates to other related components is something we are reviewing.

Like
SOLVED Posted: by ron.heck

This article has been updated to include the current version of the CLI.

Like
SOLVED Posted: by mhegge

Invoke-WebRequest -Uri https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/latest/windows/amd64/jamf-pro.exe

Does not appear work in cmd on my Windows Server

Like
SOLVED Posted: by drhoten

@mhegge Try the running the command from the Windows Powershell prompt, and not the standard one.

Like
SOLVED Posted: by mhegge

No go

Like
SOLVED Posted: by drhoten

Hey @mhegge, digging into this it appears the version of PowerShell you are using is defaulting to TLS 1.0. I'm not certain if that changed with newer versions, but you can force it to use TLS 1.2 for the session by adding the following command before the Invoke-WebRequest

So you would need to run the following commands in a single session

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/latest/windows/amd64/jamf-pro.exe
Like
SOLVED Posted: by mhegge

I think it ran, but it did not change my version. I think some additional information for the KB is warranted. Thanks Doug.

Like
SOLVED Posted: by mhegge

I ended up going to the website and downloading in manually and placing it on my Windows server......

Like
SOLVED Posted: by drhoten

@mhegge If you were not in the 'bin' directory when you ran the PowerShell command, then you would need to either manually copy the exe there or have used -OutFile parameter of the Invoke-WebRequest command to specify the download location.

In either case, we definitely need to update the KB.

Like
SOLVED Posted: by ron.heck

This article has been updated as follows:

  • Added a link to the CLI release notes
  • Added Windows PowerShell command-line information
  • Revised the URLs for downloading the CLI using a command line
Like
SOLVED Posted: by diradmin

Anyone else note this in the Jamf Pro 10.8.0 Release Notes under Known Issues:

Jamf Pro Server Tools Command-Line Interface

The following are known issues with Jamf Pro Server Tools Command-Line Interface 1.1.2 that is included in the Jamf Pro 10.8.0 installers. These issues will be fixed in upcoming releases of the CLI, which you can manually download and install. For information about downloading and installing the latest version of the CLI, see the Using the Jamf Pro Server Tools Command-Line Interface Knowledge Base article.

[PI-006437] On macOS, the Tomcat server cannot be started, stopped, or restarted using the CLI. In addition, changes made to the Tomcat configuration settings are not being saved to the .plist file. This means that when Tomcat is restarted, Tomcat configuration changes do not take effect.
[PI-006436] On Red Hat Enterprise Linux 6.x, the CLI cannot start or stop the MySQL server.
[PI-006297] The database backup functionality does not work on Linux, macOS, and Windows.

@ron.heck The Release Notes for 1.2.0 are sparse and confusing. Are these issues fixed under 1.2.0?

Like
SOLVED Posted: by ron.heck

@stephen.perry-GS Sorry about the confusion. Yes, those issues are fixed in CLI 1.2.0. We are working on updating the release notes.

Like
SOLVED Posted: by diradmin

Also zero mention of the server-tools-gui.jar introduced under 10.8.0.

Issues:
MySQL Server status broke on macOS (MySQL 5.7.x)

Feature Requests:
Report the version of the underlying binary
Provide for a means to update the binary (curl)

Like
SOLVED Posted: by CorkCityShuffle

I just updated my test-instance to 10.8.0 and tried to run the jamf-pro CLI command under Ubuntu 18.04, it returns with the message "jamf-pro: command not found".

For the 'new' server-tool-gui I get an error too, saying: "Error: unable to access jarfile server-tools-gui.jar", but I can run, at least, the DatabaseUtil.

Like
SOLVED Posted: by scottlep

I am having problems too with "jamf-pro:command not found". This is on Mac running 10.12.6. If I run commands like "jamf-pro -h" is behaves as expected. If I run any commands with sudo, such as "sudo jamf-pro -h" it reports back "jamf-pro: command not found". I am trying to convert the database of a test server, so sudo is required since "This command must be run with sudo, since it interacts with the system service" is returned if I try to run "jamf-pro database convert-to-innodb" without sudo. I have updated to the latest jamf-pro binary. I have reset the permissions on /Library/JSS/bin/ to 755 with Root as the owner, but this has not helped. I have also created the alias in Terminal using "alias jamf-pro="/Library/JSS/bin/jamf-pro"". I have also tried adding the alias to my .bash_profile. Any suggestions?

Thanks,
Scott

Like
JAMFBadge
SOLVED Posted: by david.brazeau

@ryan.ball @retroroscoe The 'apt' package manager should now work for you. Previously only the 32bit binary was being included and we have updated it to include 64bit. Let us know if you have any issues.

Like
SOLVED Posted: by drhoten

Hello @stephen.perry-GS, yes we will be mentioning the new UI tool in our documentation.

Are you still seeing the MySQL issue on macOS, could you provide us with some more details?

For your two feature requests, do you feel they are not currently covered in this KB or with the --version command?

Like
SOLVED Posted: by drhoten

Hi @CorkCityShuffle are you still running into your issue when using the latest version of the CLI tool available at the top of this KB?

Like
SOLVED Posted: by diradmin

@drhoten MySQL Server status is now reporting correctly using the updated 1.2.1 binary.

The CLI functions are great -- the point of the FR's was so that this could be accomplished through the GUI.

Like
SOLVED Posted: by drhoten

Thanks for the update @stephen.perry-GS, and I will review those feature requests with the team. They do make a lot of sense to add to the GUI.

Like
SOLVED Posted: by ron.heck

This article has been updated to include information on using the full path with sudo if an error occurs when using the CLI on Linux or macOS.

Like
SOLVED Posted: by andy.granger

I'm trying to configure the jamf-pro utility as installed with the 10.8.0 version of the jamfproinstaller.run installer for Linux on Ubuntu server 18.04.1. All flags work as expected except for the --database-backup-dir flag. Whether included in a single command with all flags, or just run individually, I receive this error:

Error: unknown flag: --database-backup-dir

Anyone have any advice?

Like
SOLVED Posted: by drhoten

Hi @andy.granger, have you tried downloading the latest version using one of the methods mentioned at the top of this KB? There were some known issues in that release that have been fixed.

Like
SOLVED Posted: by ron.heck

This article has been updated as follows:

  • Added information about placing the CLI binary in a directory on the system path on Linux and Mac platforms
  • Added information about using single quotes around passwords that contain special characters
Like
SOLVED Posted: by rstasel

Can jamf please add dates to the release notes (so we know when versions were released)?

Like
SOLVED Posted: by dan-snelson

@ron.heck @andy.granger Looks like version in 1.2.2, the database backup directory configuration flag is --backup-dir.

./jamf-pro config set --backup-dir /var/lib/mysql/backups
Like
SOLVED Posted: by ron.heck

This article has been updated to correct the database backup configuration flag to be --backup-dir.
Thanks @dan-snelson and @andy.granger for identifying this issue.

Like
SOLVED Posted: by ostrowsp

why is jamf-pro config set --database-password asking me to setup a key?

Like
SOLVED Posted: by rstasel

@ostrowsp it encrypts the database password. It's a little annoying, and not really documented, but when you then schedule a backup, or tell it to do a backup, it'll just ask for that encryption key rather than the real db password. =/

Note: You can't just hit return and have it be blank (at least, you couldn't in v1.0).

Like
SOLVED Posted: by prbsparx

@drhoten @ryan.ball @retroroscoe - I'm also running into:
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/archive.services.jamfcloud.com_jamf-pro-server-tools_release_deb_dists_stable_main_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.

Mind you... I'm running Ubuntu 14 at the moment, so that might be why....

Like
SOLVED Posted: by drhoten

Hello @rstasel and @ostrowsp we are going to be changing how we handle the password in an upcoming release of the Jamf Pro Server tools and will be removing the requirement of the key.

Thanks for lettings us know @prbsparx, currently Ubuntu Server 16.04 is the minimum required version for Jamf Pro so we will not be looking at testing or adding support for Ubuntu 14.

Like
SOLVED Posted: by prbsparx

Has the issue been fixed in 16 and 18?
I sent Ted info about what’s actual coming back during an apt update.

Like
SOLVED Posted: by loceee

Hey! It would be great if the jamfpro command line tool could return the current version of the webapp installed. I am writing some playbooks and it would be great for them to get this info from hosts in an offical supported way.

Like
SOLVED Posted: by drhoten

Hey @prbsparx, let me reach out to Ted and the team and we'll need to dig into this.

Thanks for the suggestion @loceee, are you looking to do this for an instance of Jamf Pro that is on the same server as the tools or a different server?

To get you something you need now, you can use the element applicationVersion/webApplicationVersion in

/JSS/Tomcat/webapps/ROOT/WEB-INF/xml/version.xml

or hit the endpoint

https://jamfpro.url:8443/JSSCheckConnection
Like
SOLVED Posted: by loceee

Thanks! I found the version.xml -- and have used that with the xml module in a playbook which is working well.

A snippet of Ansible xml module and a jinja filter to truncate the version and lose the -buildnumber.

- name: get version from webapp
  xml:
    path: "{{ jamf_version_file_path }}"
    xpath: //applicationVersions/webApplicationVersion
    content: text
  register: web_app_version

  • name: check version to see if we should upgrade set_fact: install_jamf: true when:
    • not install_jamf
    • web_app_version['matches'][0]['webApplicationVersion'].split("-")[0] != jamf_version

but the JSSCheckConnection is great too -- and can also let me know if a web app is up.

Cheers!

Like
SOLVED Posted: by diradmin

What is the difference between the JSSDatabaseUtil and jamf-pro utilities in terms of database backup?

Performed a backup of a static database (Tomcat not running); the JSSDatabaseUtil generated an archive of 61.9Mb, while jamf-pro (running front-end GUI) generated an archive of 61.1Mb.

Can you explain the .8Mb difference in archive size?

Like
SOLVED Posted: by drhoten

You're welcome @loceee.

@stephen.perry-GS Both applications use mysqldump to backup the database and then compress it using gzip. The Jamf Pro Server tools uses a newer version of the GNUZip library where the compression has most likely been improved.

Like
SOLVED Posted: by diradmin

@drhoten Makes perfect sense -- thank you.

Like
SOLVED Posted: by ron.heck

This article has been updated as follows:

  • The current version has been updated to CLI 1.2.3.
  • The link to the CLI "Release Notes" has been changed to "Changelog".
Like
SOLVED Posted: by diradmin

Are there plans to incorporate the prompt to restart Tomcat per a database restore, similar to the Jamf Pro Database Utility?

Like
SOLVED Posted: by bcbackes

I'm stuck on this. I've downloaded the new CLI, however, get the same error as others.

When I try to backup the database I get a "Error: Error 1045: Access denied for user 'jamfsoftware'@'localhost' (using password: YES)" error - see attached screenshot. I've gone into the tools.yaml file and deleted the password listed in there. Then, I went back through the commands to set the password. It then prompts to "Enter the key to encrypt the config file with:". I'm not sure what to put there. Even if I put "password", that won't work when I'm prompted to enter the encryption key to backup the database.

What am I missing here?

Like
SOLVED Posted: by ron.heck

This article has been updated to include information about the configuration file permissions and security mechanism changes implemented with CLI 2.0.0.

Like
SOLVED Posted: by ron.heck

This article has been updated to remove the listing of the current CLI version. See the Changelog for information about the latest CLI version.

Like
SOLVED Posted: by glutz

Is there a database repair function that is not documented?

Like
SOLVED Posted: by CorkCityShuffle

@glutz I'm using the following command to check, optimize and repair databases:

mysqlcheck -u root -p --auto-repair --optimize DATABASENAME

Like
SOLVED Posted: by ron.heck

This article has been updated to add information about the configuration file location to the “Configuring the CLI” section.

Like
SOLVED Posted: by diradmin

The server-tools-gui.jar Java app should have an "Apply" button or something to that affect for Tomcat Settings and MySQL settings. The auto save is inefficient and provides opportunity for error.

Like
SOLVED Posted: by ron.heck

This article has been updated as follows:

  • Added instructions for upgrading from CLI 2.2.6 or earlier on Linux
  • Revised the commands for downloading the CLI using a package manager on Red Hat Enterprise Linux and Ubuntu
  • Revised the commands for downloading the CLI using a command line on Linux
Like
SOLVED Posted: by ron.heck

This article has been updated to correct formatting of the package manager download commands for Ubuntu.

Like
SOLVED Posted: by diradmin

Given the volatility of the jamf-pro binary, it would be immensely helpful if Jamf improved the versioning reported for the utility. For example, I have multiple version 2.3.0 binaries, but each indicates a different build time.

For beta instances of the binary, it would be helpful if this was identified in the version check, the same as the Jamf Pro web app and applications.

Like
SOLVED Posted: by diradmin

For the purpose of submitting Feature Requests relating to the Jamf Pro Server Tools CLI, can we ask that a corresponding Primary Tenet, Primary Application, and Additional Tag be added to the FR page?

Like
SOLVED Posted: by bethjohnson

This needs an update for v 2.3.1:

For example, you can set the database password by executing the following command: jamf-pro config set --database-password p@$$w0rd Note: Replace p@$$w0rd with your password. To prevent your password from being stored in the shell history, you can set the password by executing the following command that will prompt for the password using a secure prompt: jamf-pro config set --database-password-stdin If your password contains special characters, you may need to enclose the password within single quotes.

The flag --database-password-stdin throws an "unknown flag" error.
Instead, just run --database-password with no argument and the CLI will prompt for the password to set in the config file.

Like
SOLVED Posted: by ron.heck

@bethjohnson Thanks for making us aware of this issue. We have corrected that command as follows:

Replace p@$$w0rd with your password. To prevent your password from being stored in the shell history, execute the following command, and enter your password when prompted: jamf-pro config set --database-password
Like
SOLVED Posted: by diradmin

How does one go about updating the server-tools-gui.jar between Jamf Pro releases? Is there a direct download for this java app?

Like
SOLVED Posted: by ron.heck

@diradmin You can always download the latest version of the Jamf Pro Server Tools GUI directly by clicking the following link:
https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/latest/gui/server-tools.jar

Note: The latest version as of this writing is Jamf Pro Server Tools 2.4.3, which only works with Java 11. If you are using Java 8, you should download Jamf Pro Server Tools 2.4.2 from the following link:
https://archive.services.jamfcloud.com/jamf-pro-server-tools/release/2.4.2/gui/server-tools.jar

For more information, see the Jamf Pro Server Tools Overview Knowledge Base article.

Like
SOLVED Posted: by diradmin

@ron.heck Thank you for the clarification concerning the GUI, as I had overlooked the download link in the Jamf Pro Server Tools Overview.

Concerning Java support, I see in the changelog that 2.4.3 "server tools GUI now runs on Java 11". However, your comment seems to imply that 2.4.3 will only run on Java 11. Can you clarify this?

Like
SOLVED Posted: by ron.heck

@diradmin Thanks for the question. I'll try to clarify.

  • Jamf Pro Server Tools GUI 2.4.3 or later requires Java 11. (It does not run on Java 8.)
  • Jamf Pro Server Tools GUI 2.4.2 or earlier requires Java 8. (It does not run on Java 11.)

I also added a note about these requirements to the Jamf Pro Server Tools Overview Knowledge Base article.

Like
SOLVED Posted: by diradmin

@ron.heck Thank you for the additional clarification. It would be helpful if the changelog was also clear on this. Suggest that the statement "The server tools GUI now runs on Java 11." be changed to "The server tools GUI now runs on Java 11 only." for 2.4.3.

Thanks!

Like
SOLVED Posted: by diradmin

Anyone know if the jamf-pro CLI tool logs anywhere, similar to how the JSSDatabaseUtil.jar logs to ./JSS/Logs/backupDatabase.log?

Like
SOLVED Posted: by diradmin

Per Jamf Support:

"The jamf-pro CLI does not log anywhere, but it is possible to turn on verbose output for commands using the -v flag. More about that can be found using the -h flag like so: jamf-pro -h"

Disappointing.

Like
SOLVED Posted: by diradmin

Digging into this further, under macOS 10.13.6, this utility creates the backup schedule by way of cron. As the jamf-pro binary spits out results of the backup command, by default, cron emails this output to the owner of the job/crontab. So there's your notification.

Uncertain of how this functions on macOS 10.14.5, as the GUI errors out.

Like