Skip to main content
Blog

How to Securely Manage Local Admin Passwords with Jamf Pro and LAPS

  • May 11, 2023
  • 57 replies
  • 1218 views

Show first post

57 replies

Forum|alt.badge.img+18
  • Esteemed Contributor
  • September 17, 2024

AS mentioned above, im hopeful some admin has already created a script that can tap the api and look up the management id's and reset each laps account password back to what we had it set originally, since we had nothing but issues with apple silicon machines that stopped granting volume ownership after the laps password was set.  Once I used the api to reset the laps account back to the original password of the admin account, the volume ownership was granted to the end user.  So Now id like to undo our test of the laps feature, but need something so I dont have to look up each management ID of each affected system.  This below is what I would need to run to fix this I believe:

"While Jamf Pro offers a PUT /v2/local-admin-password/{clientManagement}/set-password endpoint, it’s only available to set one computer at a time. The Jamf Pro administrator will need to create a Jamf Pro API script to set every computer password using LAPS. Only after ensuring all passwords are changed to known passwords should the administrator turn off LAPS"


talkingmoose
Forum|alt.badge.img+36
  • Author
  • Community Manager
  • September 17, 2024

@GabePPS, I'll modify what I said. Once an account is enabled for LAPS management, it'll stay that way until you re-enroll it. So first, you'll need to disable LAPS management altogether. Otherwise, setting every computer's password to the same password defeats its purpose.

You'd need to create your own script to recurse through a list of computers, but I do have a couple of scripts you can use as examples.

This one shows how to take a computer serial number, look up its management ID and get the current LAPS password:

https://gist.github.com/talkingmoose/fe84537a3a6951caa7fcb767d15ee3e6

This one shows how to set a computer's LAPS password given the management ID:

https://gist.github.com/talkingmoose/0550abf9ebb9e1267ea82a55556601d8#file-set-jamf-pro-laps-password-zsh


Forum|alt.badge.img+18
  • Esteemed Contributor
  • September 17, 2024

@talkingmoose Thanks...and no I get that.  We are looking to undo this for the apple silicon machines temporarily.  And my only way right now is to "defeat the purpose of laps" lol.  It caused an error with volume ownership that I cant seem to get around easily without wiping them all which isn't feasible.  So yes im looking at your 2 scripts and working on adapting another that I had that cycles though the Computer IDs of a smart group (originally to process a redeployment of of the jamf management framework), to maybe cobble together an "undo" script and go back for now until we can work this issue out.

 

Thanks for the links though...seeing what I can do, but ive never been skilled with api scripting with tokens, so hopefully can piggyback on some others.


Forum|alt.badge.img+1
  • New Contributor
  • October 3, 2024

Interesting post. I'm gonna go through this again and see what I learn from this. Thanks for the post!


joh_gom
Forum|alt.badge.img+6
  • New Contributor
  • October 7, 2024

Thanks for this KB article. Very detailed and specific. 


howie_isaacks
Forum|alt.badge.img+23
  • Esteemed Contributor
  • January 29, 2025

Within a few weeks of us starting to use LAPS, I was notified by a lot of my techs that the password that they obtained from Jamf Pro was not working on several Macs. We have not been using the MDM LAPS account that gets created during PreStage. We have been using the Jamf management framework LAPS accounts. For the most part the Jamf LAPS accounts work and passwords get rotated on the schedule that we set. But there's a problem. If the Mac gets re-enrolled for some reason such as no longer checking in or sending inventories reliably, or something else goes wrong that a re-enrollment could fix, the Jamf LAPS account will no longer get rotated. The password for the account on the Mac will remain the same as it was just before the Mac was re-enrolled. The reason is because Jamf Pro cannot recreate the Jamf LAPS account since it is already installed. This is shown in the Jamf log. We would need to know to delete that account before re-enrolling for Jamf LAPS to continue working. If we use MDM LAPS and re-enroll the Mac, the MDM LAPS account continues to get password rotations. I was told not to enable MDM LAPS in PreStage, but I will be doing it soon. I recently tested what would happen to LAPS accounts when a Mac is re-enrolled. On my test Mac, the Jamf LAPS account was broken but the MDM LAPS account continued to get its password rotated. I created a PreStage enrollment just for my test Mac so I could test this. After I enrolled through this PreStage, I ran a re-enrollment by running "sudo profiles renew -type enrollment" in Terminal. I wanted to share this information to help anyone who has experienced the same problem with passwords not working for LAPS.


Forum|alt.badge.img+18
  • Esteemed Contributor
  • January 29, 2025

btw see my other post about scripting a laps password reset back to a defined password, which worked well for our environment:

Re: Sonoma 14.2+ Secure Token / Volume Ownership / Boostrap Token issue?