Загрузка...

Apple watch sudo authentication

Do you own a mac mini using a keyboard without touch ID, or you have a mac without touch ID but you have an apple watch and would like to authenticate your sudo commands with the watch? Let me show you how.

I use a mac mini as my daily driver, and my main keyboard for many years was a magic keyboard with touch ID. But around 2 months ago I switched to a glove80, which is not an apple product, so it doesn't have touch ID, and mac mini's don't include touch ID either. I'll review the glove80 soon, so subscribe to find out.

I spend most of my day in my terminal doing stuff, and I sometimes need to type my sudo password in the terminal. It's a bit annoying because I have an apple watch that I use to authenticate basically everywhere else. In this video I'll help you setup macOS so that the sudo authentication requests are sent to your apple watch instead of typing the password.

Important disclaimer: Follow this guide at your own risk. I'm not responsible for broken macs, security issues related to any of the repos used, authentication problems with sudo, or any other issues that may arise from following this guide. Make sure you understand what you're doing before making changes to system files.

Requirements for this tutorial: You need macOS and an apple watch (mine is a series 8, haven't tested others). I use an M1 mac mini running sequoia, and I'm not certain if this works on intel based macs or older OS versions. Importantly, you do not need a keyboard or mac with touch ID.

A link to my detailed guide will be available below so you can copy all the commands and find all the links I share. If you like this content and want to support me, you can share a tip which helps me keep creating and sharing content. You can also follow me on Twitter, or as kids call it these days "X".

For the setup, first ensure your system settings have the appropriate watch authentication option enabled. If you have touch ID, there's a specific setup process that only works if you have a computer or keyboard with touch ID and your laptop is not in clamshell mode. This requires macOS Sonoma or above.

For those without touch ID, we'll be using pam-watchid. The installation can be done either through a script or manually. The process involves modifying system authentication files to enable watch authentication for sudo commands.

If you encounter any issues installing pam-watchid, the maintainer has enabled issues on the repository and has been helpful in resolving setup problems. In case you mess up and can't run sudo commands anymore, there's a recovery process involving safe mode and manual file editing.

Remember to follow the security best practices and make backups before making system-level changes. This setup can greatly improve your workflow by letting you authenticate sudo commands with your apple watch instead of typing passwords repeatedly.

If you're using tmux, you'll need to install pam-reattach first. This requires adding two important lines to your system configuration - one line that points to pam_reattach.so and another that points to pam_tid.so. These components work together to enable biometric authentication within terminal multiplexer sessions. The pam_tid.so module handles Touch ID authentication, while pam_reattach.so ensures the authentication prompts can work properly within tmux sessions by reattaching the process to the correct user session. Remember to check if pam_reattach.so is installed in the correct directory before proceeding with the setup

#macos #macossequoia #macossonoma #macosmonterey #macosventura #applewatch #applewatchultra #glove80 #sudo #programming #neovim #tmux #cli #terminal #linkarzu

Follow me on twitter
https://x.com/link_arzu

Видео Apple watch sudo authentication канала linkarzu
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять