pallotron / yubiswitch

OSX status bar application to enable/disable Yubikey Nano
Other
872 stars 65 forks source link

Yubiswitch doesn't notice Yubikey powering back on #10

Closed indolering closed 9 years ago

indolering commented 10 years ago

I regularly have issues with Yubiswitch detecting the presence of the Yubikey and also whether it is off.

For example, if I manually remove and reinsert the Yubikey, Yubiswitch does not detect that the Yubikey has been removed and does not power the Yubiswitch back down.

However, this behavior is occurs without manual intervention. I will try to take notes (now that I know this repo is actually under development) but I suspect that it may be linked to #5.

Perhaps there are some system hooks that get called when activating USB devices that you could listen in on?

indolering commented 10 years ago

Oh, the other interesting thing is how I can get Yubiswitch to power the device back down. I try enabling the Yubikey manually which triggers an error about there not being a Yubikey present on the machine. Then I try again and it just works.

pallotron commented 10 years ago

yeah the logic in https://github.com/pallotron/yubiswitch/blob/master/yubiswitch/YubiKey.m could be better... I'll try to find some time to make it better :) thanks for reporting the problem. I usually don't hit this problem because I leave the yubikey permanently plugged in.

indolering commented 10 years ago

I leave mine in permanently as well. Do you have FDE turned on? That could be the difference, I believe the mac has to fall back to an unencrypted OS to enter your password.

pallotron commented 9 years ago

FDE?

indolering commented 9 years ago

Full Disk Encryption. It forces the OS go through some contortions to boot.

aerickson commented 9 years ago

I have issues with my YubiKey becoming enabled again (despite the checkbox not being enabled). I notice it when I brush up against it and I paste a OTP into chat. :)

I am running FDE...

lorencarvalho commented 9 years ago

+1, FDE here as well.

pallotron commented 9 years ago

can you try version 0.9 (which I just pushed) and let me know if you still have similar problems?

pallotron commented 9 years ago

have you got a chance to try 0.9?

aerickson commented 9 years ago

I just tried 0.9. I can't get the Yubikey to emit an OTP when enabled.

I didn't restart... is that required? I killed the daemon (kill -9 required... it gets hung up) - /Library/PrivilegedHelperTools/com.pallotron.yubiswitch.helper

I've killed the daemon, quit the app, and removed/inserted the Yubikey and I still can't get it to emit an OTP.

pallotron commented 9 years ago

I just tried 0.9. I can't get the Yubikey to emit an OTP when enabled.

weird, it works for me. what yubikey do you have? have you verified that productID and vendorID strings are set correctly in the preferences? you can get the value from the system report (looking at USB section)

I didn't restart... is that required? I killed the daemon (kill -9 required... it gets hung up) - /Library/PrivilegedHelperTools/com.pallotron.yubiswitch.helper

shouldn't hang, mine dies when you sent normal SIGTERM signal

(it didn't exit after quitting Yubiswitch, is it supposed to?), but that didn't help.

yeah, helpers usually don't exit with the main application

I've killed the daemon, quit the app, and removed/inserted the Yubikey and I still can't get it to emit an OTP.

:(

what do you see in /var/log/system.log? grepping for "yubi"

aerickson commented 9 years ago

I have a Nano, the System Information was strange... it just listed the key as 'Composite Device'. After pulling it out and putting it back in a few times and still not working I cleaned the contacts... there was some dirt. It's now showing in SI as 'Yubico Yubikey II' and it's behaving properly.

I've tested by putting the machine to sleep and then touching it - no key was emitted. After enabling and touching a key is emitted.

I think the fix works.

Thanks!

pallotron commented 9 years ago

That seemed very close to the classic "have you tried turn it off and on again?" :D On Thu 20 Aug 2015 at 02:13 Andrew Erickson notifications@github.com wrote:

I have a Nano, the System Information was strange... it just listed the key as 'Composite Device'. After pulling it out and putting it back in a few times and still not working I cleaned the contacts... there was some dirt. It's now showing in SI as 'Yubico Yubikey II' and it's behaving properly.

I've tested by putting the machine to sleep and then touching it - no key was emitted. After enabling and touching a key is emitted.

I think the fix works.

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/pallotron/yubiswitch/issues/10#issuecomment-132842826 .

pallotron commented 9 years ago

I think the original issue reported in this issue should be solved