Hopefully anyone who is plagued by this bug will report it to Apple through https://feedbackassistant.apple.com/
Hi RatVader, do you have the script running at _every_ startup so it would check if Security Update has just been installed and if so, would apply a fix?Excellent idea, @CallMeDave. See the below script that I've updated to include both backing up the files it changes and checking the build number to confirm that the problematic update has been applied.
Hopefully this script is just to provide a temporary fix, and Apple patches the underlying issue soon.
https://github.com/RatVader/2021ADRepair/blob/main/2021ADRepair
I ran the script and still have have use the pkill command when my apple remote desktop application will not remote a computer.Hi RatVader, do you have the script running at _every_ startup so it would check if Security Update has just been installed and if so, would apply a fix?
Or can you apply a fix to all 10.14.6 Macs, no matter if Security Update has been installed or not?
I've tested running the commands on clean 10.14.6 and then installing Security Update 2021-004 - didn't have any problem after update.
In latter case you unnecessarily modify _all_ computers, once and for all, and don't have to run the script at _every_ startup on all of them.
Hello, this might sound silly but how do you run this scrip ? I tried using terminal but I get permission is denied/operation not permitted. ThanksFollowing up from my previous post. After doing some (a lot of) reading about Heimdal Kerberos, reports on the #MacAdmin Slack and a lot of trial and error here is what I have discovered. The problem is definitely being caused by the credentials cache, more specifically the Heimdal kcm (credential cache server) and seems limited to machines bound to a directory (possibly only Active Directory) before Security Update 2021-004 got installed. It may also affect machines bound after the Security Update but I have not tested that. I have not yet figured out exactly what is happening but the end result is that updated machines are no longer able to access the credential cache; which consequently prevents any ticket action from taking place. I could only find two lines of interest form the logs and you can see that they relate directly to cache config:
View attachment 1782147
The fix (well, really just a stop-gap measure until I can discover the actual cause) is to basically tell the OS to ignore cached Kerberos credentials for authorization (as well as screensaver). A shout out to @jojo on #MacAdmins for confirming my suspicions. To do this you will need to edit two system files (yours should look similar to these):
Code:/etc/pam.d/authorization # authorization: auth account auth optional pam_krb5.so use_first_pass use_kcminit auth optional pam_ntlm.so use_first_pass auth required pam_opendirectory.so use_first_pass nullok account required pam_opendirectory.so /etc/pam.d/screensaver # screensaver: auth account auth optional pam_krb5.so use_first_pass use_kcminit auth required pam_opendirectory.so use_first_pass nullok account required pam_opendirectory.so account sufficient pam_self.so account required pam_group.so no_warn group=admin,wheel fail_safe account required pam_group.so no_warn deny group=admin,wheel ruser fail_safe
Using your favorite text editor (sudo) remove use_kcminit from each file.
For good measure I also killed related processes:
Code:sudo pkill coreauthd sudo pkill kcm sudo pkill kdc
In my testing this does not prevent remote users (those without connectivity to the domain controller) from logging into/unlocking their machines but I urge you to do your own testing before rolling it out.
I've also written a no-frills script to make it easy to deploy to users:
Bash:#!/bin/bash sed -i '' "s/use_kcminit//" "/etc/pam.d/authorization" sed -i '' "s/use_kcminit//" "/etc/pam.d/screensaver" pkill coreauthd pkill kcm pkill kdc
Enable the root accountHello, this might sound silly but how do you run this scrip ? I tried using terminal but I get permission is denied/operation not permitted. Thanks
Hey @m4ctech, This particular script was optimized primarily for deployment via Munki and to run as-needed on computers exhibiting AD auth issues in our fleet. I wrote it to not disable credential caching on machines that weren't exhibiting the issue, as there are benefits to using the cache. The method you've described will certainly work, however, as the update doesn't modify the /etc/pam.d/authorization or /etc/pam.d/screensaver files.Hi RatVader, do you have the script running at _every_ startup so it would check if Security Update has just been installed and if so, would apply a fix?
Or can you apply a fix to all 10.14.6 Macs, no matter if Security Update has been installed or not?
I've tested running the commands on clean 10.14.6 and then installing Security Update 2021-004 - didn't have any problem after update.
In latter case you unnecessarily modify _all_ computers, once and for all, and don't have to run the script at _every_ startup on all of them.
Hello @dacc1234, I've noticed that the pkilling doesn't always refresh everything that it seems needs to be refreshed, so I always reboot after running the script.I ran the script and still have have use the pkill command when my apple remote desktop application will not remote a computer.