Live data from Hacker News

Use Touch ID for Sudo on Mac

davidwalsh.name

41–50 of 221 posts

Re: Use Touch ID for Sudo on Mac

#41
post #25

Next step: SSH automatically paste password from Keychain/OnePass/LastPass after Touch ID.

Don't use passwords in SSH login at all and add your private passphrases to the keychain to unlock the key. The keychain can be unlocked with touch id

Re: Use Touch ID for Sudo on Mac

#43
post #17
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

You have to take your fingers off the keyboard for this which is a big distractor, worse than using a mouse. I use this feature for other touch cases (e.g. unlocking 1Password) but would hate it when in the flow. Admittedly my password is well wired into my fingers.

If you use your little finger RHS print as a reference, perhaps that won't be too bad? On the keyboard it seems fairly reachable.

I haven't tried it myself ...

Re: Use Touch ID for Sudo on Mac

#45
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

Not sure how "fooling" comes into play. Only trusted applications can request to use Touch ID/Face ID in the first place. It's not like there's a way for a random application to just say "Scan your face and let me take over your machine"

Re: Use Touch ID for Sudo on Mac

#46
post #17
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

You have to take your fingers off the keyboard for this which is a big distractor, worse than using a mouse. I use this feature for other touch cases (e.g. unlocking 1Password) but would hate it when in the flow. Admittedly my password is well wired into my fingers.

Maybe that’s better, if you’re using sudo you should probably think a second before you do what you were going to do. I used to enforce the disclaimer coming up every time after I broke a package one too many times.

Re: Use Touch ID for Sudo on Mac

#47
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 don’t get it, the article shows it in 2 steps why the 5 step verbosity??

It seems in Big Sur the file you need to edit is not writable. So you need to make it writable first, edit it, and then change permissions back to read-only.

Re: Use Touch ID for Sudo on Mac

#48
> 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?

Re: Use Touch ID for Sudo on Mac

#49
post #47

Earlier quoted context omitted.

I don’t get it, the article shows it in 2 steps why the 5 step verbosity??

It seems in Big Sur the file you need to edit is not writable. So you need to make it writable first, edit it, and then change permissions back to read-only.

This doesn't seem to be strictly true - the two-line solution worked exactly as expected for me on 11.2.1. I used nano instead of vi (personal preference), but it worked nonetheless.
Post reply on HN