Skip to main content
Home
Nicholas Mangold

Main navigation

  • About
  • Projects
  • Blog
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Blog

How to use sudo with Touch ID on macOS Sonoma 14.x and above

For macOS Ventura 13.x and below, see How to use sudo with Touch ID on a Mac.

In macOS Sonoma, a new method has been introduced to enable Touch ID when running sudo commands, making it more persistent across system updates. Previously, editing the /etc/pam.d/sudo file was necessary, but these changes would revert after an update, requiring reconfiguration. With Sonoma, the settings can be added to a separate file /etc/pam.d/sudo_local, which isn't overwritten during updates, allowing Touch ID to remain enabled for sudo commands consistently.

Simply run the following command in your terminal to enable using sudo with Touch ID and make it persist across OS upgrades.

sed -e 's/^#auth/auth/' /etc/pam.d/sudo_local.template | sudo tee /etc/pam.d/sudo_local

The previous code performs the following steps.

  • Copies the local sudo configuration file template provided by masOS Sonoma and above.
  • Names the file sudo_local so it can be recognized by the system when detecting authorization methods.
  • Uncomments the line enabling the touch ID module.

Open an new terminal session and test the setup.

sudo ls
Tags
Mac
Touch ID
About text formats

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Certifications

Badge for the Acquia Certified Developer - Drupal 7 certification
Badge for the Acquia Certified Front End Specialist - Drupal 7 certification
Badge for the Acquia Certified Back End Specialist - Drupal 7 certification
Badge for the Acquia Certified Grand Master - Drupal 7 certification

Recent Projects

Argonne National Laboratory

Screenshot of the Argonne National Laboratory homepage

Texas OAG

Screenshot of the Texas OAG homepage

Siemens PartQuest

Screenshot of the  Seimens PartQuest homepage

DODEA

Screenshot of the DODEA homepage
View more projects

Recent blog entries

  • How to use sudo with Touch ID on macOS Sonoma 14.x and above
  • Drush throws an "Access denied; you need (at least one of) the PROCESS privilege(s)" error message
  • Troubleshooting "ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER privilege(s) for this operation"
  • How to set up a local Drupal environment
  • How to use sudo with Touch ID on a Mac
View more blog entries
RSS feed
Powered by Drupal