Live data from Hacker News

Use Touch ID for Sudo on Mac

davidwalsh.name

61–70 of 221 posts

Re: Use Touch ID for Sudo on Mac

#61

> 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)

> it takes longer for the fingerprint to register than it takes to type your password

You mean the black void where there’s no feedback on how many characters you typed? I always have to write my password a couple of times to get it right.

Re: Use Touch ID for Sudo on Mac

#62
post #17

Earlier quoted context omitted.

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 ...

I did try that but it's a stretch worse that the extrema of Emacs.

Re: Use Touch ID for Sudo on Mac

#63

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?

I’ve just added this to my .bash_profile:

  enable-sudo-touchid() {
    sudo sed -i -e '1s;^;auth       sufficient     pam_tid.so\n;' /etc/pam.d/sudo
  }
But probably automating the check (if the automated checker has the correct permission) would not be that hard.

Re: Use Touch ID for Sudo on Mac

#66
post #29
post #17

Earlier quoted context omitted.

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.

I want a mouse with Touch ID in the button. Or on the side.

It would be cool if they built it into the touchpad in a future generation. I'm guessing once they can figure out fingerprint through the glass on iPhone they'll do it in the touchpad, too.

Re: Use Touch ID for Sudo on Mac

#67
Every update requires you to redo this. It's so repetitive that I keep a copy of what I want `/etc/sudo` to look like in my homedir and, whenever I get the prompt for a sudo attempt, I instead sudo to cp the file. Then I go on my way with what I was originally intending.has recently sudo'd.

Rote but effective.

Re: Use Touch ID for Sudo on Mac

#68

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?

Does `sudo chflags schg /etc/pam.d/sudo` work?

Re: Use Touch ID for Sudo on Mac

#69
post #65

Using biometrics instead of a secret-based authentication is always a bad idea. Secrets can be changed easily when they get compromissed, your figerprints/iris/whatever cannot. https://www.csoonline.com/article/3330695/6-reasons-biometri...

How often has your mother given money to someone else who pretended to be you? Because parents identify their children through biometric authentication. They look at you and can in a matter of split seconds verify that you are actually you. Biometric authentication is the oldest and most sophisticated form of authentication. I can enter my work place and nobody asks me to type in a password at the door because the staff can immediately identify my identity by simply validating my face with their own eyes. It's incredible, trust me.

Re: Use Touch ID for Sudo on Mac

#70
Does anybody know if there's a solution for keychain password copy too? I have a very complicated vpn password that I change often (so I don't remember it), but each day, when connecting to the vpn, I have to open keychain and type my user password to get the vpn password. I couldn't find a way to use touch id for that.
Post reply on HN