Posted on 03-20-2019 01:10 PM
I have a computer that was registered with jamf when it was purchased, and it initially connected with the jamf system.
Not it is showing that the computer has not checked into jamf since it was first unpacked.
when i attempt to run sudo jamf, i get:
[~]sudo jamf
Password:
sudo: jamf: command not found
when i look in /usr/local, theres is no trace of the jamf executable.
[~]ls -l /usr/local
total 0
drwxrwxr-x@ 78 ralphbellofatto admin 2496 Mar 7 20:04 Cellar
drwxrwxr-x@ 3 ralphbellofatto admin 96 Mar 7 19:59 Frameworks
drwxrwxr-x@ 21 ralphbellofatto admin 672 Mar 7 20:04 Homebrew
drwxrwxr-x@ 473 ralphbellofatto admin 15136 Mar 8 07:10 bin
drwxrwxr-x@ 12 ralphbellofatto admin 384 Mar 7 20:04 etc
drwxrwxr-x@ 91 ralphbellofatto admin 2912 Mar 8 07:09 include
drwxrwxr-x@ 348 ralphbellofatto admin 11136 Mar 8 07:10 lib
drwxrwxr-x@ 96 ralphbellofatto admin 3072 Mar 7 20:04 opt
drwxrwxr-x@ 3 ralphbellofatto admin 96 Mar 7 20:01 sbin
drwxrwxr-x@ 39 ralphbellofatto admin 1248 Mar 7 20:04 share
drwxrwxr-x@ 5 ralphbellofatto admin 160 Mar 7 20:04 var
Can someone tell me how to recover from this?
Posted on 03-20-2019 01:17 PM
sudo jamf checkJSSconnection
would be a good command to run - run jamf help
no sudo to see a list of all commands.
Posted on 03-20-2019 01:32 PM
Do you get anything when you specify the full path?
sudo /usr/local/bin/jamf checkJSSConnection
Posted on 03-20-2019 01:42 PM
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.
Posted on 03-20-2019 02:04 PM
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.
Posted on 03-20-2019 02:47 PM
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 :)
Posted on 03-21-2019 01:35 PM
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.
Posted on 03-22-2019 05:42 AM
Try: Sudo jamf prompt -enroll
sudo jamf isn't a command (need an argument, for example: sudo jamf recon, sudo jamf policy)