sudo jamf checkJSSconnection
would be a good command to run - run jamf help
no sudo to see a list of all commands.
Do you get anything when you specify the full path?
sudo /usr/local/bin/jamf checkJSSConnection
as @ryan.ball as noted, i had an issue with i think the package installed in a version of 10.6 that broke the ability to call jamf from anywhere in terminal. When i called it from the full path as outlined that worked and the commands ran just fine. As far as im aware it was/is a product issue that was addressed in later versions.
You might also want to check if /usr/local/bin is a directory like it is supposed to be. The broken installers would replace it with a symlink. The command "readlink /usr/local/bin" should produce no output. If it does, delete /usr/local/bin, replace it with an empty folder, unenroll and reenroll the machine.
In addition to the last three suggestions, there could also be something that's messing with your system's PATHs. Try this command in Terminal:
echo $PATH
When I run that, I get this: (I've done a decent bit of messing with this over the years, so I might be showing more output than you'll see)
/usr/local/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
So anyways, just for a little context in case it's needed, this is a list of all of the directories that we can just run commands like 'jamf' out of without having to specify the full path. Like @ryan.ball suggested, the typical path for the Jamf Binary is:
/usr/local/bin/jamf
So I can just run "jamf" in Terminal because /usr/local/bin is in my PATH. Then, to my suggestion to see if maybe the Jamf Binary either got lifted off the system somehow, or if our PATH is messed up, try running:
which jamf
That should tell you where macOS is finding the Jamf Binary, and then you can check to make sure that's in your PATH. If nothing is returned, then my suggestion would be to re-enroll the Mac using whatever methods are applicable to your workflows.
Hope this helps :)
in answer to these things:
[~]sudo /usr/local/bin/jamf checkJSSConnection
Password:
sudo: /usr/local/bin/jamf: command not found
[~]echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS
[~]which jamf
[~]
[~]/usr/local/bin/jamf
-bash: /usr/local/bin/jamf: No such file or directory
When i attempt to re-enroll, i get the image i attached here.


Try: Sudo jamf prompt -enroll
sudo jamf isn't a command (need an argument, for example: sudo jamf recon, sudo jamf policy)