> For the complete documentation index, see [llms.txt](https://www.techwithtyler.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.techwithtyler.dev/operating-systems/macos/touchid-for-sudo.md).

# TouchID for Sudo

## Overview

Instead of having to type our password each time we use `sudo` we can instead use Touch ID on our mac keyboards.&#x20;

{% hint style="warning" %}
While we can use the `/etc/pam.d/sudo` file for this, changes will not survive system updates, and if we accidentally mess something up, it's [quite a pain](https://medium.com/@zmre/quick-tip-fixing-the-sudo-file-on-macos-cf3c2a2584d4) to fix it!
{% endhint %}

Instead, we can&#x20;

* Copy the file `/etc/pam.d/sudo_local.template` to `/etc/pam.d/sudo_local`&#x20;
* Then remove the `#` in front of the `auth` like below

```bash
# /etc/pam.d/sudo_local
𝗮𝘂𝘁𝗵    𝘀𝘂𝗳𝗳𝗶𝗰𝗶𝗲𝗻𝘁   𝗽𝗮𝗺_𝘁𝗶𝗱.𝘀𝗼
```

Then save, and the next time you run sudo, you'll be prompted for Touch ID instead of your password.&#x20;

<figure><img src="/files/YB7ubJ9WXkZYXzP92uM5" alt=""><figcaption></figcaption></figure>
