PezzaD84 / macLAPS

LAPS solution for macOS managed with Jamf
40 stars 9 forks source link

LAPS Last Decoded Date empty #12

Closed erppaul closed 1 week ago

erppaul commented 1 year ago

Hi, the extension attribute LAPS Last Decoded Date remains empty even after decoding. Ideas for a solution? Thanks for your efforts!

Code: !/bin/bash

LAPSLOG="/Library/.LAPS/Logs/LAPS.log"

LAST_LAPS_DECODED=$(grep "LAPS Decoded" $LAPSLOG | tail -1 | awk '{print $4,$5}')

echo "$LAST_LAPS_DECODED"

image

Logfile: "..." the dots are used to blacken

LAPS Decode 10/08/2023 03:09:29 SwiftDialog is installed. Checking installed version..... Dialog is up to date. Continuing to assemble.... The LAPS Password for ... was viewed by paul... on .... Reason for viewing password: test Password rotation has been set to 15 Minutes. LAPS Password for ... will be reset at 03:25. LAPS Decode 10/08/2023 03:25:05 SwiftDialog is installed. Checking installed version..... Dialog is up to date. Continuing to assemble.... LAPS Account cycled 10/08/2023 03:25:09 Password length has been set to 14 characters A Special character has been set in the password ... has already been created and is a local admin. Resetting local admin password.... Password validated The LAPS Password for ... was viewed by ... on ... Reason for viewing password: ja Password rotation has been set to 15 Minutes. LAPS Password for ... will be reset at 03:40. LAPS Account cycled 10/08/2023 03:40:11 Password length has been set to 14 characters A Special character has been set in the password ... has already been created and is a local admin. Resetting local admin password.... Password validated CryptKey and SecretKey Escrowed to Jamf successfully Device serial is ... JAMF ID is 27 LAPS Configuration was successful LAPS Launch Daemon found. Removing old Launch Daemon. Launch Daemon removed. Completing rotation...

PezzaD84 commented 1 year ago

Hi @erppaul

I've just checked and the EA is working fine. The code snippet you pasted above is missing the markers around the echo response. Did you by any chance remove these from the script as that would explain why it's not showing anything in JAMF? If not have you tried running a few recons after the password is decoded just to see if the EA is updated if run manually?

Regards,

Perry

erppaul commented 1 year ago

Hi @PezzaD84,

Which marker do you mean? I compared my script with yours again and found no difference. I have tried it several times as you described.

Kind regards Paul

PezzaD84 commented 1 year ago

Oh wait I see whats happened. Github has stripped off the <result></result> part from around the echo line. Can you confirm that this is in your EA and the final echo line looks like echo "<result>$LAST_LAPS_DECODED</result>"

If this is correct in your EA then there should be no reason that it's not showing up.

If you run a sudo jamf recon -verbose can you see the EA running and its successful?

erppaul commented 1 year ago

That's right, you're right. It is still present in my script. I have entered the command and the EA works. but is still not displayed. - I wait a bit and reload again. image

erppaul commented 1 year ago

I have renewed the code additionally, but the field remains empty. What can I do? image

erppaul commented 1 year ago

Hi @PezzaD84, are there any updates on my issue by now? Any further ideas?