Skip to main content
Question

Initiating "jamf removeFramework" from a policy

  • January 23, 2023
  • 3 replies
  • 21 views

Forum|alt.badge.img+2

We have some Macs that were "gifted" to departing staff and I need to remove them from management without wiping them. I am referencing the Unmanaging Computers from Jamf Pro article but it assumes having physical or direct network access, which I don't have. Is it possible to effect this using a Policy?

I was thinking I could use the "nohup" utility to allow the commands to continue running without being terminated as the Jamf utility itself is removed. Something like this:

nohup bash -c "sleep 30; jamf removeMDMProfile; jamf removeFramework; reboot" &

This seems to work if I initiate the Policy from Self Service, but not if it is triggered by the Recurring Check-in. What am I missing?

3 replies

sharriston
Forum|alt.badge.img+10
  • Valued Contributor
  • 152 replies
  • January 23, 2023

I struggled with this for years and it still never worked quite right. The method I ended up going with is Jamf policy installs a launchagent and a script that just has 

sudo jamf removeFramework

 Then forces a reboot. So basically on check in the launchagent gets installed and the script, it prompts the user to reboot, once they reboot the launch agent runs the script. 

 

I will say it never worked 100%. 


Forum|alt.badge.img+7
  • Contributor
  • 37 replies
  • January 25, 2023

Personally, I think you should run a Wipe command instead of sudo jamf removeFramework then remove from ABM and Jamf 


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • 1 reply
  • January 25, 2023

Personally, I think you should run a Wipe command instead of sudo jamf removeFramework then remove from ABM and Jamf 


I have considered the "wipe" option, but I would need to somehow make contact with the user first to ensure they have their personal files backed up.