Earlier quoted context omitted.
The thing that doesn't make sense here is that macOS discards randomly your settings, but it is also the only OS I use that regularly gets in a fucked up state where settings have to be nuked. I mean, here we are in year 37 of the mac and people are still zapping their PRAMs. The only improvement is you don't have to physically pull out the battery.
In year 37 you can't manually zap the 'PRAM' on Apple Silicon Macs.
Use Touch ID for Sudo on Mac
131–140 of 221 posts
Re: Use Touch ID for Sudo on Mac
#132Re: Use Touch ID for Sudo on Mac
#133The 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!
visudo will lint the resulting file and (should) reject the change if it would break your system.
Re: Use Touch ID for Sudo on Mac
#134This 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?
People getting their pf rules thrown away each time - it is like unlocking your front door each time you run the vacuum cleaner.
Re: Use Touch ID for Sudo on Mac
#135Earlier quoted context omitted.
Why cant Apple use their TimeMachine tech to take a snapshot of the prefs on the existing, then do their image based update, then have it automatically apply the prefs from the timemachine mod-integration? The richest company in the world can't think different?
What if one file was written by a malicious program?
I actually wrote a white paper on just this in ~2003 or so - and met with several engineers from google and they said it was impossible.
The idea being that you only carried around with you your profile, and you could just come to a dumb terminal, plug in your key, three factor auth - and the terminal would give you access to the apps and resources they had...
(I should write ((again)) a short story on this)
Re: Use Touch ID for Sudo on Mac
#136The 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!
s/vi/visudo/ visudo will lint the resulting file and (should) reject the change if it would break your system.
Re: Use Touch ID for Sudo on Mac
#137Earlier quoted context omitted.
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.
A step further so you don't have to think about enabling it: sudo() { unset -f sudo if [[ "$(uname)" == 'Darwin' ]] && ! grep 'pam_tid.so' /etc/pam.d/sudo --silent; then sudo sed -i -e '1s;^;auth sufficient pam_tid.so\n;' /etc/pam.d/sudo fi sudo "$@" }
Thought on the second thought, I’ll continue to use the more “manual” method for now. As it gives me more control and it would be easier to switch off when touch ID sudo will be supported more officially.
Re: Use Touch ID for Sudo on Mac
#138Re: Use Touch ID for Sudo on Mac
#139Earlier quoted context omitted.
In year 37 you can't manually zap the 'PRAM' on Apple Silicon Macs.
True, but I guess 95% of mac users are still on Intel macs, are still being told by "genius" bar frontline support to reset the SMC / zap PRAM for any kind of issue, and this usually works, too. Jury is still out on whether the M1 auto-zapping architecture is better, or will just be more prone to being permanently messed up.