<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>thde.io - macOS</title>
    <link rel="self" type="application/atom+xml" href="https://thde.io/tags/macos/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://thde.io"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-06-07T00:00:00+00:00</updated>
    <id>https://thde.io/tags/macos/atom.xml</id>
    <entry xml:lang="en">
        <title>Enable Touch ID for sudo on macOS</title>
        <published>2026-06-07T00:00:00+00:00</published>
        <updated>2026-06-07T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://thde.io/blog/touchid-sudo/"/>
        <id>https://thde.io/blog/touchid-sudo/</id>
        
        <content type="html" xml:base="https://thde.io/blog/touchid-sudo/">&lt;p&gt;Since macOS Sonoma, there is an official way to enable Touch ID for &lt;code&gt;sudo&lt;&#x2F;code&gt; that survives OS updates via &lt;code&gt;&#x2F;etc&#x2F;pam.d&#x2F;sudo_local&lt;&#x2F;code&gt;.&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Run this single command to apply it:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#268BD2, #268BD2);&quot;&gt;sed&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;s&#x2F;^#auth&#x2F;auth&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; &#x2F;etc&#x2F;pam.d&#x2F;sudo_local.template&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#859900, #859900);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#268BD2, #268BD2);&quot;&gt; sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; tee&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#2AA198, #2AA198);&quot;&gt; &#x2F;etc&#x2F;pam.d&#x2F;sudo_local&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This copies the system-provided template and uncomments the &lt;code&gt;pam_tid.so&lt;&#x2F;code&gt; line in one step. The resulting file looks like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#657B83, #839496); background-color: light-dark(#FDF6E3, #002B36);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# sudo_local: local config file which survives system update and is included for sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# uncomment following line to enable Touch ID for sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auth       sufficient     pam_tid.so&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open a new terminal and &lt;code&gt;sudo&lt;&#x2F;code&gt; will prompt for Touch ID.&lt;&#x2F;p&gt;
&lt;img src=&quot;touchid-sudo.png&quot; alt=&quot;Touch ID sudo prompt&quot; width=&quot;320&quot;&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;support.apple.com&#x2F;kb&#x2F;HT213893&quot;&gt;Apple Support HT213893&lt;&#x2F;a&gt;, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;apple.stackexchange.com&#x2F;a&#x2F;466029&quot;&gt;Stack Exchange&lt;&#x2F;a&gt; &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
</feed>
