pam-watchid icon indicating copy to clipboard operation
pam-watchid copied to clipboard

Doesn't work on new macOS big sur

Open AlexDrBanana opened this issue 4 years ago • 16 comments

This pam module doesn't seem to work with the new macOS big sur any more.

AlexDrBanana avatar Jul 09 '20 09:07 AlexDrBanana

Same problem

newdev8 avatar Jul 11 '20 14:07 newdev8

Library Validation failed: Rejecting '/usr/local/lib/pam/pam_watchid.so.2' (Team ID: none, platform: no) for process 'sudo(54344)' (Team ID: none, platform: yes), reason: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

Okay so it needs to be signed on Big Sur. Also keep in mind the target for x64 system is "x86_64-apple-macosx10.16", at least that's true for dev beta 2.

jankytay avatar Jul 12 '20 09:07 jankytay

@jankytay How did you obtain the more detailed error message? I'm attempting to sign my version of this but I can't get the more detailed output at present.

rblenkinsopp avatar Jul 27 '20 12:07 rblenkinsopp

Even after signing with --options=library the error message becomes:

Library Validation failed: Rejecting '/usr/local/lib/pam/pam_watchid.so' (Team ID: T6RHPHE4L3, platform: no) for process 'sudo(16521)' (Team ID: none, platform: yes), reason: mapping process is a platform binary, but mapped file is not

From what I've been able to find, this is the result of a security move from Apple that prevents system components from loading plugins that are not system components, regardless of signature validity.

rmoats avatar Jul 30 '20 18:07 rmoats

Compiled and works fine for me. macOS 11.0 DP3 Build 20A5323l Screenshot 2020-07-30 at 3 40 11 PM

scordinskyc avatar Jul 30 '20 19:07 scordinskyc

I can confirm that this seems to be resolved in macOS 11.0 DP3 Build 20A5323l for me as well - no changes and a completely unsigned .so

rblenkinsopp avatar Jul 31 '20 13:07 rblenkinsopp

Even after signing with --options=library the error message becomes:

Library Validation failed: Rejecting '/usr/local/lib/pam/pam_watchid.so' (Team ID: T6RHPHE4L3, platform: no) for process 'sudo(16521)' (Team ID: none, platform: yes), reason: mapping process is a platform binary, but mapped file is not

From what I've been able to find, this is the result of a security move from Apple that prevents system components from loading plugins that are not system components, regardless of signature validity.

I should mention that my recent struggles with this are on Catalina (10.15.6), definitely caused by a very recent (within the last week?) update, as I have been using pam_watchid daily for a month or more. Hopefully this breakage is actually being reverted in Big Sur on purpose.

rmoats avatar Aug 01 '20 10:08 rmoats

I'm also using it on the latest macOS Catalina version 10.15.6 and it does work for me.

newdev8 avatar Aug 01 '20 14:08 newdev8

@scordinskyc @rblenkinsopp

how did u guys made it to work..?

I'm also on macOS 11.0 Beta 3, only works if I disable SIP...

ghost avatar Aug 04 '20 18:08 ghost

I just successfully configured this on Big Sur release running on Mac mini. No extra steps needed

TimofeyK avatar Nov 20 '20 00:11 TimofeyK

As another data point, I just got this working on an arm mac mini. SIP off, no codesigning, only change was in Makefile TARGET=arm64-apple-macosx11.0

cobbal avatar Nov 23 '20 06:11 cobbal

After trying to install this, whatever arrangement of lines in the sudo file I use I get the following error when trying to use sudo:

sudo: unable to initialize PAM: No such file or directory

I'm on 11.1, so maybe Apple has protected this file further. I haven't, and really don't want to, disable any security settings.

alexclst avatar Dec 16 '20 23:12 alexclst

Works on my Intel MBP (12,1) on 11.1 (should be 20C69, don't exactly remember) (TARGET=x86_64-apple-macosx11.1) and 11.2 Beta (20D5029f) (TARGET=x86_64-apple-macosx11.2). I only modified the TARGET variable in Makefile and all default security settings were in place.

Linus-XZX avatar Dec 25 '20 02:12 Linus-XZX

Ditto, working here on an M1 Mac Mini by changing the Makefile target to TARGET=arm64-apple-macosx11.0

joshpuetz avatar Dec 30 '20 23:12 joshpuetz

Hmm, must have screwed up the build the first try. Just tried again and it worked. This time I used the TARGET that running swift -version returned. Note that on an M1 Mac this appears to be quite a different formulation for a target than on Intel Macs.

alexclst avatar Dec 31 '20 03:12 alexclst

I'm on Big Sur 11.1 on an M1 Mac mini, only change was TARGET=arm64-apple-darwin20.2.0 but I'm getting Killed: 9. Any advice?

fmckeogh avatar Jan 19 '21 12:01 fmckeogh