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

talkingmoose
Forum|alt.badge.img+36
  • Author
  • Community Manager
  • June 9, 2023

@YanW, I have a sample script I’ve been using for testing here:

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

I wrote it a little experimentally. Look for the "get computer management ID” section, which references the apiGET function earlier in the script.


YanW
Forum|alt.badge.img+11
  • Contributor
  • June 9, 2023

@talkingmoose thank you


Forum|alt.badge.img+1
  • New Contributor
  • July 11, 2023

@talkingmoose I have setup LAPS and it's working fine for me, but I want to reduce the LAPS password length from 30 characters to 12 characters,

It looks like we are using the FileVault key to the LAPS account, Please let me know if we can do that in API or JAMF.


talkingmoose
Forum|alt.badge.img+36
  • Author
  • Community Manager
  • July 14, 2023

@BagaleAnil You’ll probably be interested in upvoting this feature request:

Give the new LAPS feature the ability to create passwords with modifiable complexity

Also, Jamf Pro’s LAPS feature doesn’t manage the FileVault password for the account. I recommend not enabling the account for FileVault. You should already have the computer’s personal recovery key escrowed and should use it instead for those times when the computer is in the hands of IT but powered off.


dan-snelson
Forum|alt.badge.img+30
  • Honored Contributor
  • August 11, 2023

Forum|alt.badge.img+1
  • New Contributor
  • August 23, 2023

hey @dan-snelson 

Any suggestions on why i keep having this error when i run the lapss from terminal?

All the information shows up, except the password. Username matches with the admin local account, and was deployed via prestage. 



dan-snelson
Forum|alt.badge.img+30
  • Honored Contributor
  • August 23, 2023

@Double_G:

The function includes a number of `echo` statements which are commented-out. 
 
I recommend enabling those statements and see if that helps pinpoint where things are going sideways. 
 
(You’re welcome to DM me on the MacAdmins Slack: @dan-snelson.)
 
Thanks. 

perryd84
Forum|alt.badge.img+11
  • Contributor
  • August 31, 2023

Nice write up!!

I've made a nice gui dialog box for configuring JAMF LAPS and a nice gui for viewing the LAPS password.
They are up on my github and might be of use to some of you?
https://github.com/PezzaD84/JAMFLAPS-Configurator
https://github.com/PezzaD84/JAMF-LAPS-UI

Just to note these are very early versions so they might have little qwerks.


dstranathan
Forum|alt.badge.img+19
  • Valued Contributor
  • September 15, 2023

This article states that PreStage can be used for management but fails to mention that LAPS will break the account’s Secure Token and thus CANT be used to manage FV2 and starting with Jamf Pro 10.49 Jamf even recommends NOT using this account for FV2 related activities.

But what’s the point of an IT admin account if it can’t be used for tasks that require a Secure Token? Things like Software Update, running the sysadminctl command and FV2 are critical things that an IT department might need an administrator account with a Secure Token for. But according to Jamf it won’t work because the token is corrupted after LAPS rotation.

Thoughts?

 


perryd84
Forum|alt.badge.img+11
  • Contributor
  • September 15, 2023

@dstranathan I also saw these notes and did have the same thoughts. The JAMF Documentation also mentions not to log in with the management account or use it for admin tasks and recommends creating a separate local admin account for admin tasks. This comment makes the use of JAMF LAPS a little redundant to me?!

I came across these same issues when making my own LAPS solution where the account isn't FV enabled but this doesn't limit the account to not fully administer the device. The account gets a secure token automatically so it can run software updates, log in and run any admin tasks. The FV drawback can be bypassed by logging in with the recovery key and then the LAPS account can do it's thing.

I've thought of ways to automatically enable FV but with lot's of devices being deployed as zero-touch and the end user becoming the only FV enabled user it makes this task hard as you would need to get the users password at some point.


dstranathan
Forum|alt.badge.img+19
  • Valued Contributor
  • September 15, 2023

This doc from WIllaim got my LAPS juices flowing back in April and was the genesis of why I decided to move from a UIE Jamf Management admin account to a PreStage admin account in the first place. In fact, I called a meeting with Jamf to start planning my FV2 project (which is supposed to go live in October) based on ideas I got from this article. But the Jamf doc fails to mention 2 critical facts:

-The PreStage admin account can't be used for FV2 etc because the Secure Token will be killed after LAPS rotation.

-The UIE Jamf Management admin account can also be used with LAPS.


@perryd84 I was slo told by Jamf (for 7+ years!) to never use the UIE Jamf Management admin account for general IT tasks like SSH, ARD etc. This was causing issues at my org because we have a policy to not have more than 1 IT account per Mac for security. This is another reason I moved to a PreStage account in the first place. Now I might end up needing 2 or more going into 2024. This is crazy. 


Forum|alt.badge.img+7
  • Contributor
  • September 20, 2023

Hey @talkingmoose , I just saw your presentation at JNUC. Very good! Well organized and presented.

I manage about 800 systems and as part of our standard configuration have the local admin account already created. We use this account to preform administration functions on the systems whenever necessary.

I would like to test out the LAPS system but I don't think I can as soon as I activate it, it will start rotating the password on all my systems. Correct?

How would you go about setting up a test environment so we can develop and test deploying LAPS to our fleet? Should we ignore Jamf's sytem and use yours (macOSLAPS)?

Thanks a ton!!! 

 

p.s. Love your handle. Is it a throwback to antlered friend that used to inhabit my Mac Plus waaaay too many years ago?


talkingmoose
Forum|alt.badge.img+36
  • Author
  • Community Manager
  • September 22, 2023

@Dan11, thanks so much for the kudos on the presentation! I have to say Starbucks not only upsized my drink later that day but the next day, so I was pretty well caffeinated later on. ;-P

Jamf Pro’s LAPS story is still evolving and you may have seen there are two accounts that it may affect — the managed Apple admin account created during Automated Device Enrollment (MDM account) and the Jamf management account created from the settings in User-Initiated Enrollment (JMF account).

For years we’ve been encouraging customers not to use the JMF account for their own purposes but to leave it for only Jamf Pro to use. As soon as your server updates to Jamf Pro 10.49.0, the JMF account is automatically put under LAPS. The only other settings you can test are the rotation frequency and the delay between someone viewing the password and the automatic rotation.

There’s more work to do with the MDM account, but if you’re using that for your own needs, I’d make sure to begin transitioning now to a different account you can create using a policy. (Or consider not using a shared IT admin account at all, which is much more secure.)

If you’re concerned about testing, ask your Customer Success Manager at Jamf for a Jamf Cloud sandbox instance. It’s free. You can enroll a Mac and test there and see how it’s going to affect you.

When the development seems to have settled down, I’m hoping to put out a revised article explaining both types of LAPS and walking through how to prepare using them in production.

And, yes! Talking Moose from Bob Levitus’s Stupid Mac Tricks!


Forum|alt.badge.img+7
  • Valued Contributor
  • September 28, 2023

@talkingmoose Hi

We have the situation where we have used the same username for the management account created in User-Initiated Enrollment settings and a managed local administrator account created in a PreStage enrollment (which was never an issue until LAPS has come online).

So we have some machines showing in Jamf as Managed by: administrator, administrator  This is confirmed when looking in the API which shows 2 LAPS capable accounts (JMF and MDM) both with the same username. When trying to get the LAPS password for administrator if fails, as you would expect.

I have deleted the administrator account (after setting a new local account with admin rights), but it is still showing in the API with the 2 LAPS administrator accounts (and showing in Jamf as Managed by: administrator, administrator).

So is there a way of removing, or renaming one of these accounts to solve this issue, before we enable LAPS?

I would like to avoid the rebuilding of those machines if at all possible.


talkingmoose
Forum|alt.badge.img+36
  • Author
  • Community Manager
  • September 28, 2023

@sdunbar Currently, using the same username name for both the MDM LAPS account and JMF LAPS account puts you in an “unknown” state. Jamf Pro can’t have two processes managing one account.

My recommendation is to immediately change the username for one or the other. It doesn’t matter which and the change won’t apply until you re-enroll a machine.

Next, pick one LAPS method (MDM via the PreStage Enrollment or JMF via User-Initiated Enrollment) as your preferred LAPS management method. MDM LAPS accounts are managed using Apple’s technology and JMF is managed using Jamf’s technology. For you, I suggest changing the JMF account name in UIE and using the JMF LAPS account.

You can then send a /usr/local/bin/jamf enroll -noPolicy command in a policy (Files and Processes > Execute Command) to re-enroll computers and apply the updated LAPS management account.

I haven’t tested this workflow to re-enroll to change the LAPS account, so be sure to test yourself on a single computer or small group of computers and verify the results first.

Finally, if you choose to implement some sort of shared IT admin account that’s known to multiple engineers (I strongly recommend not doing this) then use a policy to create that account going forward.


Forum|alt.badge.img+7
  • Valued Contributor
  • October 3, 2023

@talkingmoose

That is great, much appreciated. 

I'll give that a go and see how I get on. We have only used the shared IT admin a/c as a temporary measure until we get this sorted.

Many thanks


perryd84
Forum|alt.badge.img+11
  • Contributor
  • October 3, 2023

If anyone is using JAMF LAPS I've made some updates to my LAPS UI tool which you can find here https://github.com/PezzaD84/JAMF-LAPS-UI

Just makes viewing the LAPS Password a little more user friendly. You can scope this tool to your help desk etc and then they don't need JAMF or API access to view the password.


dstranathan
Forum|alt.badge.img+19
  • Valued Contributor
  • November 1, 2023

Any idea when PreStage accounts will be required to use LAPS?  

The Jamf Pro 11 Deprecation doc mentions it but no dates are provided. Why not?

 

My techs require a PreStage account to deploy new Macs. Enabling LAPS at enrollment time will break all my workflows. I'd like to request to Jamf devs that the PreStage admin get LAPS at a time window that I control as an admin - not when Jamf dictates.

 


Forum|alt.badge.img
  • New Contributor
  • January 23, 2024

Hi @talkingmoose @sdunbar ,

Have try the method to fix the same username for the management account created in User-Initiated Enrollment settings and a managed local administrator account created in a PreStage enrollment by renaming the user for the User-Initiated Enrollment but when I run the commande I got this error message:

sudo /usr/local/bin/jamf enroll -noPolicy        

There is an error in your syntax.

Error: Valid credentials are required to enroll this computer. Use either the -invitation or the -prompt option to authenticate.

Have also try re-enroll with this command using my jamf admin credential

sudo /usr/local/bin/jamf enroll -prompt -noPolicy

JSS Username:jamfadmin

JSS Password: ***

But I'm still not able to see the laps admin password from the Jamf API:

Did anyone has been able to fix this situation ?

Many thanks.


Forum|alt.badge.img+7
  • Valued Contributor
  • January 24, 2024

Hi @RichClic 

I had a similar issue, with being prompted for credentials. I got the re-enrolment to work (for me) using  profiles renew -type enrollment 

One issue I have got however, is that if I try to run the command via a policy it does not pop up with the window asking to confirm the re-enrolment, but if run from Self Service it works fine. So I having difficulties getting it done with minimal user interaction.

If the re-enrolment fails I have found the machine can end up being unmanaged (but I got it managed again using the Jamf API to Redeploy the Jamf Management Framework).

Hope that helps.


Forum|alt.badge.img+6
  • Contributor
  • January 26, 2024

This should be a much more simple process, and JAMF shouldn't be forcing this on anyone until it is fully functional within the Jamf Pro GUI, at the earliest. Even then, it should be a customer choice.

https://learn.jamf.com/bundle/jamf-pro-release-notes-current/page/Deprecations_and_Removals.html

 


dstranathan
Forum|alt.badge.img+19
  • Valued Contributor
  • February 20, 2024

Just chiming in on a related topic and linking to recent changes...

According to Jamf from this Jamf Nation community link PreStage admin accounts will continue to be able to be set with a
static password for the remainder of 2024.

As of Jamf Pro 11.3, admins can now view LAPS passwords from Inventory section of a computer record. See this video overview.


dstranathan
Forum|alt.badge.img+19
  • Valued Contributor
  • February 20, 2024

Ugh, wait: This Jamf Pro 11.3 document (dated yesterday Feb 19 2024) says that LAPS WILL BE REQUIRED for PreStage account. What is going on...?


Forum|alt.badge.img+1
  • New Contributor
  • March 13, 2024

@perryd84 , how do you get encoded API credentials ? 


perryd84
Forum|alt.badge.img+11
  • Contributor
  • March 13, 2024

@ITMan You can use this little script here 

If you put in your API account username and password the script will echo out an encoded string you can use to get the bearer token from JAMF. I'm looking to change the authentication method to use the new API roles feature in the next release.