GithubHelp home page GithubHelp logo

Comments (15)

klali avatar klali commented on May 30, 2024

This looks like something else in your pam stack (or OS X always requiring at least password for sudo?) denies the authentication. What is the full contents of the sudo pam.d file?
A good tip when doing this is to keep a terminal with a root shell around, so you know that you can change it back.

from yubico-pam.

 avatar commented on May 30, 2024

Hi Klas,

my sudo pam.d file looks like this:

$ cat sudo
# sudo: auth account password session
auth required pam_opendirectory.so
auth sufficient pam_yubico.so mode=challenge-response debug
account required pam_permit.so
password required pam_deny.so
session required pam_permit.so

I am not aware that there is a setting that will cause this. Here is what I have in the Screensaver pam.d

$ cat screensaver
# screensaver: auth account
auth optional pam_krb5.so use_first_pass use_kcminit
auth required pam_opendirectory.so use_first_pass nullok
auth sufficient pam_yubico.so mode=challenge-response debug
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

The unlocking of the Screensaver also fails.

Maybe I misconfigured something within this files, but maybe the usage of FileVault hdd encryption cause this.

Advance Thanks

from yubico-pam.

klali avatar klali commented on May 30, 2024

You could try putting pam_yubico before the other auth stuff so it executes first. I don't know anything about filevault and how that ties in with pam though..

/klas

from yubico-pam.

 avatar commented on May 30, 2024

I switched the orders in the files, but the result remains the same. If I activate the Screensaver and plugin the Yubikey, the screen still stays locked.

Bye
Michael

from yubico-pam.

 avatar commented on May 30, 2024

SO, a small Update. After changing the order in the sudo pam.d I just need to plugin the key, to make sudo work :)

Anyway, it still do not work for the screensaver. :(

from yubico-pam.

 avatar commented on May 30, 2024

That is what I get, within the system console when I remove the Yubikey, start the Screensaver and than plug in the Yubikey back into the System:

13.02.15 13:24:38,091 com.apple.SecurityServer[55]: Token reader Yubico Yubikey NEO OTP+CCID removed from system
13.02.15 13:24:41,000 kernel[0]: AppleUSBMultitouchDriver::message - kIOUSBMessagePortHasBeenReset.
13.02.15 13:24:41,942 com.apple.SecurityServer[55]: Token reader Yubico Yubikey NEO OTP+CCID inserted into system
13.02.15 13:24:41,943 com.apple.SecurityServer[55]: reader Yubico Yubikey NEO OTP+CCID: state changed 0 -> 34
13.02.15 13:24:41,943 com.apple.SecurityServer[55]: token in reader Yubico Yubikey NEO OTP+CCID cannot be used (error 229)
13.02.15 13:24:42,000 kernel[0]: AppleUSBMultitouchDriver::checkStatus - received Status Packet, Payload 2: device was reinitialized
13.02.15 13:24:42,401 hidd[71]: MultitouchHID: device bootloaded
13.02.15 13:24:42,000 kernel[0]: AppleUSBMultitouchDriver::_deviceSetReport - DeviceRequest for reportID 0xc8 returned with result 0xe000404f - retrying
13.02.15 13:24:46,799 loginwindow[67]: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.
13.02.15 13:24:52,086 com.apple.SecurityServer[55]: reader Yubico Yubikey NEO OTP+CCID: state changed 32 -> 18
13.02.15 13:24:54,128 Console[15934]: Failed to connect (_consoleX) outlet from (NSApplication) to (ConsoleX): missing setter or instance variable
13.02.15 13:24:55,291 com.apple.SecurityServer[55]: reader Yubico Yubikey NEO OTP+CCID: state changed 16 -> 34
13.02.15 13:24:55,292 com.apple.SecurityServer[55]: token in reader Yubico Yubikey NEO OTP+CCID cannot be used (error 229)
13.02.15 13:24:57,100 loginwindow[67]: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.

from yubico-pam.

 avatar commented on May 30, 2024

So, I checked for that Error and found this http://forum.yubico.com/viewtopic.php?f=26&t=1574

Afterwards I Installed the Yubikey NEO Manager and enabled U2F nearly giving me a heart attack, because I thought I just erased everything from my key.

So, now the following is happening. The gibberish that I send up on the top, while I try to run a sudo command is gone. If the Yubikey is plugged, I can run sudo commands when the key is just plugged in.

Now, the messages in the console log are also gone, when I try to unlock the Screensaver with the Yubikey. But it still will not unlock the screensaver.

Anyone Ideas where I could dig next?

ATdHvAaNnKcSe

from yubico-pam.

 avatar commented on May 30, 2024

Run a reboot, sudo still works, screensaver still get:

13.02.15 14:08:28,913 com.apple.SecurityServer[55]: reader Yubico Yubikey NEO OTP+U2F+CCID: state changed 32 -> 18
13.02.15 14:08:32,036 com.apple.SecurityServer[55]: reader Yubico Yubikey NEO OTP+U2F+CCID: state changed 16 -> 34
13.02.15 14:08:32,036 com.apple.SecurityServer[55]: token in reader Yubico Yubikey NEO OTP+U2F+CCID cannot be used (error 229)
13.02.15 14:08:42,448 com.apple.SecurityServer[55]: reader Yubico Yubikey NEO OTP+U2F+CCID: state changed 32 -> 162
13.02.15 14:08:42,449 com.apple.SecurityServer[55]: token in reader Yubico Yubikey NEO OTP+U2F+CCID cannot be used (error 229)

from yubico-pam.

 avatar commented on May 30, 2024

Do I maybe need to install https://smartcardservices.macosforge.org driver to make this work?

from yubico-pam.

klali avatar klali commented on May 30, 2024

I think you're simply getting stuck in the fact that the screensaver on OS X is not completely integrated with pam, and disabling password auth for it might be impossible / managed from something completely different.

from yubico-pam.

 avatar commented on May 30, 2024

Okay, it seems so. :(
Maybe Rohos will sometime soon provide a new Version of Rohos Logon Key for OS X, but to be honest, Ido not think, they will move fast on this one.

Thank you anyway :)

At least, I have GPG, sudo and some other Stuff running with my Yubikey :)

from yubico-pam.

JonnyWhatshisface avatar JonnyWhatshisface commented on May 30, 2024

I have it working just fine on Mac OS X with the screensaver, sudo and authorization...Is this still an issue, megatraveler?

from yubico-pam.

 avatar commented on May 30, 2024

Hi Jonny, yes, I just gave up on some point. I can use the key for switching to sudo but I still can not unlock the screen saver with my yubikey. I assume that is maybe because I use FileVault. If you have an idea I would be glad to hear :)

from yubico-pam.

JonnyWhatshisface avatar JonnyWhatshisface commented on May 30, 2024

In my screensaver pam.d auth file (/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
auth required pam_yubico.so mode=challenge-response authgroup=yubikey
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

Please note that the authgroup=yubikey is specific to my implementation and the fork in my repository. I've submitted a request to merge it. None the less, if you remove the authgroup=yubikey, it should work fine for you provided you have done the following:

Open the YubiKey personalization tool and choose Challenge-Response. Select the MAC-SHA1 option. Then, select Configuration Slot 2. Make sure the "Require user input (button press)" option under the HMAC-SHA1 parameters is UNCHECKED, and ensure Variable Input is selected. Click Generate, then Write Configurations.

After that, do the following:

mkdir -m0700 -p ~/.yubico

Make sure your yubikey is plugged in, and enter the following command:

ykpamcfg -2

It should tell you that it successfully created a file in your home directory under .yubikey (challenge-<serial #>). Then, modify your /etc/pam.d/screensaver as seen above, minus the authgroup= (unless you use my fork). With the current master repo for the PAM module, doing so would require EVERY user have a yubikey to unlock the screen saver. My fork adds the authgroup= which will allow you to specify a group name of users required to have a yubikey. If the user is not in the specified group, it will skip over checking for a key... If you'd prefer that functionality, you won't find it in the current release (yet). I submitted a pull request, though I'm having issues with my editor wanting to automatically correct the indentation of the code without notifying me as I close it... lol

None the less, give this a whirl and let me know if it works out for you. Please keep in mind that this works also for the authorization module (for login). It can work with su and sudo, but you have to ensure you enable tty_tickets - which is disabled on Mac OS X by default (which I find stupid, personally).

from yubico-pam.

JonnyWhatshisface avatar JonnyWhatshisface commented on May 30, 2024

Also, as a side note? Please ensure that when you do the ykpamcfg -2 , you are doing it as the user you wish to bind the key to. If you're sudo'd to root? It will put it in the root home directory, thus, you won't be able to unlock your screensaver because the user running the screensaver won't have a challenge file generated. I did this initially... Luckily, I tested it with the screensaver first, and not authorization. :)

from yubico-pam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.