How to force a check in on Casper

ccarcamo
New Contributor II

Hi - I'm looking for a way to force a device check-in on Casper (9.72). Whether its hidden somewhere on Casper or a script I can manually run on the device to check in.

Thanks

15 REPLIES 15

kitzy
Contributor III

There's no way to force a check in from the JSS console, but if you have physical access to the machine and an admin account, you can run

sudo jamf policy

which will force the machine to check in.

mm2270
Legendary Contributor III

What @kitzy posted is correct. This will make the Mac check in, but bear in mind it will also make the Mac run any policies that are based on the Recurring Check-in trigger that are in scope at the time.
If all you want is for the Mac to update its Last Check-in field in the Casper record, you can also just do:

sudo jamf log

That simply updates the Last Check-in timestamp, but doesn't make any policies run. its a little unclear what you actually meant by making the Mac 'check in' so I just wanted to put that out there in case.

SmithersJr
New Contributor II

I realize this thread is a few months old, but... You can run those commands without physical access via Casper Remote, can't you?

AVmcclint
Honored Contributor

You can run the command via Casper Remote only if the computer still has the same IP as it did when it last checked in. if you have Apple Remote Desktop or know the IP and can SSH into it, that would be the most reliable way of doing it.

ChicagoGuy1984
New Contributor III

sudo jamf recon - will invoke the RECON to run inventory . - it works "locally!"

but here is a strange part:

I can SSH into the remote client then run "sudo jamf recon" and it will update the JSS. but why can't I run either sudo jamf recon or "jamf recon" as a root via the ARD? Apple Remote Desktop? It baffles me slightly since, as we all know ARD , all it does it uses the SSH to connect to machine and run commands (in the most simplistic terms)

does anybody know what is the command to force machine inventory from Apple Remote Desktop?

Thank You!

mpermann
Valued Contributor II

@ChicagoGuy1984 put the full path to the binary in your ARD command and it should work. I think the reason it doesn't work without it is because ARD doesn't know the path to it.

Chuey
Contributor III

@ChicagoGuy1984 Not sure what version of JSS or OS X you are running but I am currently running 9.81 and mainly 10.X machines, so the binaries for jamf moved and you now have to specify it like this in ARD:

/usr/local/jamf/bin/jamf recon

ChicagoGuy1984
New Contributor III

@mpermann

sudo /usr/local/bin/jamf displayMessage -message "HELLO NEWMAN"

This still will not work!!!! =) (again it works locally as is pasted above) but once I put it in "Unix Command" under ARD - it does not - But pointing out that it may need full path was a great idea!

Chuey
Contributor III

@ChicagoGuy1984 Ok, I just tested via ARD and it worked successfully for me. You don't need the "sudo" in front of the command since you can specify, "Run Command as", check "User", enter "root"

It worked fine for me just like this in ARD:

/usr/local/jamf/bin/jamf displayMessage -message "HELLO NEWMAN"

run as root

ChicagoGuy1984
New Contributor III

@Chuey

Yes, i did a quick test of my own ... i may have picked a strange one , requiring an interactive session on the computers - although i did log on with a user ans still NO "MESSAGE popup

but this command works just fine:

/usr/local/bin/jamf recon

from my experience i run all my Short unix commands in ARD, and if i leave /sudo or no sudo , both work (of course running as ROOT selected)

Thanks All for your help!

Chuey
Contributor III

@ChicagoGuy1984 Interesting. Glad we could help!

Cheers

mjh
New Contributor

I realize this thread is old, but is there a problem with the following approach:

Create a policy with no package but with "jamf recon" in the Execute Command section, which should run as root
Scope that policy how you want (all computers? yikes!, but to a smart group on recurring checkin)

Obviously you want folks to automatically drop out of the smart group at recon, or make sure you turn off that policy manually!

Voila?

mjh
New Contributor

Obviously #2, I'm talking about 'recon,' not 'policy'

hening
New Contributor

Thank you for the solution. This is very helpful.

patrickbravo
New Contributor

I like "sudo jamf manage", gives me a clear message in terminal that a check to the JSS was attempted.