---
title: "Discussion on \"How to allow Touch ID to authenticate for Sudo commands on Mac\" | Hashnode"
description: "Discussion on \"How to allow Touch ID to authenticate for Sudo commands on Mac\". To enable TouchID on your Mac to authenticate you for sudo access instead of a password you need to do the following steps.\n\nOpen Sudo configuration file with the following command\n\nsudo vi /etc/pam.d/sudo\nInitially file content should look like this..."
url: "https://hashnode.com/posts/how-to-allow-touch-id-to-authenticate-for-sudo-commands-on-mac/5dbd3d03aaa616c464d62be3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to allow Touch ID to authenticate for Sudo commands on Mac](https://thamaraiselvam.dev/how-to-allow-touch-id-to-authenticate-for-sudo-commands-on-mac?utm_source=hashnode&utm_medium=feed)

To enable TouchID on your Mac to authenticate you for sudo access instead of a password you need to do the following steps. Open Sudo configuration file with the following command sudo vi /etc/pam.d/sudo Initially file content should look like this...

Nov 2, 2019 · thamaraiselvam.dev  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#macos](https://hashnode.com/tag/macos)
-   [#terminal](https://hashnode.com/tag/terminal)
-   [#authentication](https://hashnode.com/tag/authentication)

## Written by

[Thamaraiselvam](https://hashnode.com/@thamaraiselvam)

@thamaraiselvam · Chennai, India

  
[View profile](https://hashnode.com/@thamaraiselvam)

Lead Consultant at ThoughtWorks

I am a highly motivated and experienced engineer with a passion for helping teams deliver software faster, more reliably, and more securely. I am proficient in a wide range of DevOps technologies along with Software Development and have a proven track record of success in leading and mentoring teams. I am also a strong communicator and educator, and I enjoy sharing my knowledge with others.

## Responses 2

Markdown supported · ⌘↵ to post

[John James Jacoby](https://hashnode.com/@JJJ)

[Nov 25, 2019](https://hashnode.com/posts/how-to-allow-touch-id-to-authenticate-for-sudo-commands-on-mac/5dbd3d03aaa616c464d62be3/comment/5ddc17c956bccd8d4408d331)

Thanks for linking the source and for calling out the iTerm2 comment specifically. Saved me a bit of time!

[Emil Moe](https://hashnode.com/@emilmoe)

[Nov 3, 2019](https://hashnode.com/posts/how-to-allow-touch-id-to-authenticate-for-sudo-commands-on-mac/5dbd3d03aaa616c464d62be3/comment/5dbe9209aaa616c464d630e6)

Brilliant. Thanks!

Would it at all be possible to do on a Linux server when on ssh onto a server?

[Thamaraiselvam](https://hashnode.com/@thamaraiselvam)

[Nov 3, 2019](https://hashnode.com/posts/how-to-allow-touch-id-to-authenticate-for-sudo-commands-on-mac/5dbd3d03aaa616c464d62be3/comment/5dbe9209aaa616c464d630e6#reply-5dbecb4920c89dc564f91116)

Thanks for the comment, if you SSH into your machine it will fall back to just use your password since you can't send your TouchID fingerprints over SSH

[Emil Moe](https://hashnode.com/@emilmoe)

[Nov 3, 2019](https://hashnode.com/posts/how-to-allow-touch-id-to-authenticate-for-sudo-commands-on-mac/5dbd3d03aaa616c464d62be3/comment/5dbe9209aaa616c464d630e6#reply-5dbefdad20c89dc564f91307)

[Thamaraiselvam](https://hashnode.com/@thamaraiselvam) Yes I thought so and I realised you already wrote that in the article, but I missed it. Doh! I wish in the future that it will be possible to forward a text string from the touch ID based on which server you are connected to. But that's another story.
