Live data from Hacker News

Use Touch ID for Sudo on Mac

davidwalsh.name

51–60 of 221 posts

Re: Use Touch ID for Sudo on Mac

#51

Earlier quoted context omitted.

shift Z Z is faster.

Debatable and depends on length of time shortcut has been in use. I can type :wq like a madman. My finger can slide straight from w to q, whereas with double-z, I have to pick my finger up and put it back down. So much movement! What next, you want me to run a marathon?

I guess it's a learned dexterity thing.

:wq =

ZZ =

As someone with mildly poor dexterity (and I don't touch-type with all my fingers, I mostly use my index fingers), the second approach looks somewhat more interesting to test.

Re: Use Touch ID for Sudo on Mac

#52

> Since you expect to be be typing in a command line, moving your finger to touch the key is probably not very efficient. Why is this not very efficient? Isn't moving my finger to touch the key equivalent to a single key stroke? How is a single key stroke less efficient then many key strokes?

Admittedly I've never used Mac's implementation but I could see a slowdown if it takes longer for the fingerprint to register that it takes to type your password (which is probably the fastest combination of characters you can type)

Re: Use Touch ID for Sudo on Mac

#54

> Since you expect to be be typing in a command line, moving your finger to touch the key is probably not very efficient. Why is this not very efficient? Isn't moving my finger to touch the key equivalent to a single key stroke? How is a single key stroke less efficient then many key strokes?

Admittedly I've never used Mac's implementation but I could see a slowdown if it takes longer for the fingerprint to register that it takes to type your password (which is probably the fastest combination of characters you can type)

If you're touch iding everything you normally password for, you can afford to have a less fast to type password.

Re: Use Touch ID for Sudo on Mac

#55

> Since you expect to be be typing in a command line, moving your finger to touch the key is probably not very efficient. Why is this not very efficient? Isn't moving my finger to touch the key equivalent to a single key stroke? How is a single key stroke less efficient then many key strokes?

Admittedly I've never used Mac's implementation but I could see a slowdown if it takes longer for the fingerprint to register that it takes to type your password (which is probably the fastest combination of characters you can type)

From my experience it's much faster. Just the tiny fraction of a second that it takes me to look at my caps lock key to verify that it's not on takes longer than my fingerprint scan and at that point I haven't even typed a single letter yet :)

Also it's arguably not the fastest combination of characters I can type, because my password is not "test1234" and I don't get much opportunity to type it at all anymore since everything can be unlocked via TouchID except the terminal, or so I thought at least :)

Re: Use Touch ID for Sudo on Mac

#56
This is amazing -- but every. single. update. disables it again

Why does the sudo file not persist between updates? This case is quite minor for personal computers, but what about companies that log in with yubikeys or smart cards? Do they have to reconfigure after every update too?

Re: Use Touch ID for Sudo on Mac

#57
post #8

The article will not allow sudo changes on Big Sur - at least, not without changing permissions of the sudo file first: 1. sudo -Si 2. chmod 644 /etc/pam.d/sudo 3. vi /etc/pam.d/sudo 4. Add the 'Auth sufficient pam_tid.so' line 5. chmod 444 /etc/pam.d/sudo 6. ... 7. Profit! Very handy tip though, thanks!

I usually just `sudo nano` it, works fine

Re: Use Touch ID for Sudo on Mac

#58
post #35
post #27

Earlier quoted context omitted.

It still strikes me as weird that Apple went with Touch ID vs Face ID on the Mac. Computer form factors in general, and particularly notebooks and AIOs, should be perfect for Face ID: the user is always at a good distance, in the right position, looking at it, and as you say will frequently have their hands otherwise occupied actually controlling the system. For that matter a Face ID+iPhone-quality camera thing for M…

Less likely to accidentally fool you into tapping the finger sensor vs fool you into showing your face to the camera

Could say the same thing about iOS, and this is a silly UX complaint anyway. Apple could easily offer or require some purposeful interaction using mouse/keyboard along with Face ID and it'd still be a nicer UX.

Re: Use Touch ID for Sudo on Mac

#59
post #2

Very handy. But you can use your Apple Watch for sudo which is even better: [0] [0] https://github.com/insidegui/pam-watchid

If you have a Touch ID Mac, enabling Touch ID for sudo also enables using an Apple Watch, so you can use either if you like.

If I remember rightly, this only works with the lid open.

Re: Use Touch ID for Sudo on Mac

#60

> Since you expect to be be typing in a command line, moving your finger to touch the key is probably not very efficient. Why is this not very efficient? Isn't moving my finger to touch the key equivalent to a single key stroke? How is a single key stroke less efficient then many key strokes?

I think it depends a lot on how long your password is, as well.
Post reply on HN