October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Cupertino desk2 min

Enable Touch ID for sudo on Mac Without Editing the Main PAM File

macOS supports Touch ID for sudo through /etc/pam.d/sudo_local. Create the file from your Mac’s shipped template and enable the pam_tid.so entry.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes. macOS supports using Touch ID to authenticate local sudo commands through /etc/pam.d/sudo_local. Apple says this configuration persists across software updates. To set it up, use the template shipped on your Mac and enable its pam_tid.so entry.

Can Touch ID on Mac authenticate sudo in Terminal?

Yes. Apple Support says, “Touch ID can be allowed for sudo with a configuration that persists across software updates using /etc/pam.d/sudo_local.” In the same macOS Sonoma enterprise update note, published November 6, 2024, Apple directs readers to /etc/pam.d/sudo_local.template for details: Apple’s macOS Sonoma enterprise update note.

As an Amazon Associate I earn from qualifying purchases.

The template-based setup procedure described in community guidance is to copy that template to /etc/pam.d/sudo_local and uncomment the line auth sufficient pam_tid.so. That copy-and-uncomment procedure is community guidance, not a direct Apple instruction: Ask Different’s Touch ID and sudo discussion.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set up Touch ID for sudo

  1. Open Terminal and create the local configuration file from the template shipped on your Mac:

    #1 Best Overall
    Apple Magic Keyboard with Touch ID for Mac Models with Apple Silicon - US English ​​​​​​​, Bluetooth
    • Magic Keyboard is available with Touch ID, providing fast, easy and secure authentication for logins and to unlock your Mac.
    • Magic Keyboard with Touch ID delivers a remarkably comfortable and precise typing experience.
    • It’s also wireless and rechargeable, with an incredibly long-lasting internal battery that will power your keyboard for about a month or more between charges.
    • It pairs automatically with your Mac, so you can get to work right away.
    • It features a USB-C port and includes a woven USB-C Charge Cable that lets you pair and charge by connecting to a USB-C port on your Mac.
    sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local
  2. Open the new file for editing with administrator privileges:

    sudo nano /etc/pam.d/sudo_local
  3. Find the line #auth sufficient pam_tid.so and remove the leading #, leaving:

    Rank #2
    Apple Magic Keyboard with Touch ID and Numeric Keypad for Mac Models with Apple Silicon - US English - White Keys, Bluetooth, Bluetooth
    • Magic Keyboard is available with Touch ID, providing fast, easy and secure authentication for logins and to unlock your Mac.
    • Magic Keyboard with Touch ID and Numeric Keypad delivers a remarkably comfortable and precise typing experience.
    • It features an extended layout, with document navigation controls for quick scrolling and full-size arrow keys, which are great for gaming.
    • The numeric keypad is also ideal for spreadsheets and finance applications.
    • It’s wireless and features a rechargeable battery that will power your keyboard for about a month or more between charges.
    auth sufficient pam_tid.so

    Save the file and exit the editor. In nano, press Control-O, Return, then Control-X.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Run a command that uses sudo, such as sudo -v. When macOS requests authentication, try Touch ID. If it is unavailable or does not authenticate, enter your account password.

    Rank #3
    Magic Keyboard with Touch ID and Numeric Keypad for Mac Models with Apple Silicon - US English - Black Keys
    • Magic Keyboard is available with Touch ID, providing fast, easy and secure authentication for logins and to unlock your Mac.
    • Magic Keyboard with Touch ID and Numeric Keypad delivers a remarkably comfortable and precise typing experience.
    • It features an extended layout, with document navigation controls for quick scrolling and full-size arrow keys, which are great for gaming.
    • The numeric keypad is also ideal for spreadsheets and finance applications.
    • It’s wireless and features a rechargeable battery that will power your keyboard for about a month or more between charges.

What the setup changes—and what it does not

The change adds the Touch ID authentication module to the local sudo PAM configuration. Using sudo_local matters: Apple identifies it as the file for a configuration that persists across software updates. Avoid treating edits to the main /etc/pam.d/sudo file as the update-persistent method.

Use the template on your own Mac as the version-specific reference rather than copying a template from another macOS installation. The available guidance does not establish that every release ships an identical template or that the procedure behaves identically in every terminal, remote session, or managed-device environment.

Rank #4
Apple Magic Keyboard with Touch ID for Mac Models with Apple Silicon [Lightning Port] (QWERTY English) Silver (Renewed)
  • WIRELESS, RECHARGEABLE CONVENIENCE - Magic Keyboard with Touch ID connects wirelessly to your Mac via Bluetooth. And the rechargeable internal battery means no loose batteries to replace.
  • WORKS WITH ANY MAC WITH APPLE SILICON - It pairs automatically with your Mac with Apple silicon so you can get to work right away. See the list of compatible devices above. Requires a Mac with Apple silicon using macOS 11.4 or later.
  • ENHANCED TYPING EXPERIENCE - Magic Keyboard delivers a remarkably comfortable and precise typing experience.
  • QUICK UNLOCK WITH TOUCH ID - Touch ID gives you a fast, easy, secure way to unlock your Mac and sign in to apps and sites.
  • GO WEEKS WITHOUT CHARGING - The incredibly long-lasting internal battery will power your keyboard for about a month or more between charges. (Battery life varies by use.) Comes with a woven USB-C to Lightning Cable that lets you pair and charge by connecting to a USB-C port on your Mac.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

If Touch ID does not appear

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.