https://it.digitaino.com/use-touchid-to-authenticate-sudo-on-macos/ Skip to content Digitaino IT Technical Support * Blog * Services Use TouchID to Authenticate sudo on macOS Posted on July 2, 2022July 4, 2022 by digitaino Your TouchID equipped Mac can easily be configured to use your fingerprint to approve sudo commands. [sudo_touchid] Use your favorite text editor and open the file /etc/pam.d/sudo and add the following line auth sufficient pam_tid.so below the pam_smartcard.so line as shown below and then save (Ctrl+O for pico) the file. $ sudo pico /etc/pam.d/sudo UW PICO 5.09 File: /etc/pam.d/sudo # sudo: auth account password session auth sufficient pam_smartcard.so auth sufficient pam_tid.so auth required pam_opendirectory.so account required pam_permit.so password required pam_deny.so session required pam_permit.so ^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text^T To Spell File Name to write : /etc/pam.d/sudo ^G Get Help ^T To Files ^C Cancel TAB Complete [ Wrote 7 lines ] ^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text^T To Spell That's it. Now when you open a new Terminal window you can use TouchID to approve sudo commands. If you also have your Apple Watch set to unlock your Mac, you will also be able to approve sudo commands by double-clicking the side button on the watch. Keep in mind that this file is somewhat protected by macOS so after each OS update you will need to add the line to the file. Other than that, it works perfectly! Posted in macOS, ScriptingTagged automation, macos, script, sudo, terminal, touchid Post navigation Previous: Automatically Disconnect Wifi When Wired Interface Is Detected. Next: Finder Tweaks After a Fresh macOS Install 2 thoughts on "Use TouchID to Authenticate sudo on macOS" 1. [c31] Marion says: July 3, 2022 at 10:55 am Slick! Thank you! Reply 2. Pingback: Automatically Disconnect Wifi When Wired Interface Is Detected. - Digitaino IT Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * [ ] [ ] [ ] [ ] [ ] [ ] [ ] Comment * [ ] Name * [ ] Email * [ ] Website [ ] [ ] Save my name, email, and website in this browser for the next time I comment. [Post Comment] Search [ ]Search Recent Posts * Finder Tweaks After a Fresh macOS Install * Use TouchID to Authenticate sudo on macOS * Automatically Disconnect Wifi When Wired Interface Is Detected. Recent Comments 1. G on Automatically Disconnect Wifi When Wired Interface Is Detected. 2. digitaino on Automatically Disconnect Wifi When Wired Interface Is Detected. 3. G on Automatically Disconnect Wifi When Wired Interface Is Detected. 4. Automatically Disconnect Wifi When Wired Interface Is Detected. - Digitaino IT on Use TouchID to Authenticate sudo on macOS 5. digitaino on Automatically Disconnect Wifi When Wired Interface Is Detected. We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking "Accept All", you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent. Cookie SettingsAccept All Manage consent Close Privacy Overview This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience. Necessary [*] Necessary Always Enabled Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously. Cookie Duration Description This cookie is set by GDPR Cookie Consent 11 plugin. The cookie is cookielawinfo-checkbox-analytics months used to store the user consent for the cookies in the category "Analytics". The cookie is set by GDPR 11 cookie consent to record cookielawinfo-checkbox-functional months the user consent for the cookies in the category "Functional". This cookie is set by GDPR Cookie Consent 11 plugin. The cookies is cookielawinfo-checkbox-necessary months used to store the user consent for the cookies in the category "Necessary". This cookie is set by GDPR Cookie Consent cookielawinfo-checkbox-others 11 plugin. The cookie is months used to store the user consent for the cookies in the category "Other. This cookie is set by GDPR Cookie Consent 11 plugin. The cookie is cookielawinfo-checkbox-performance months used to store the user consent for the cookies in the category "Performance". The cookie is set by the GDPR Cookie Consent 11 plugin and is used to viewed_cookie_policy months store whether or not user has consented to the use of cookies. It does not store any personal data. Functional [ ] Functional Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features. Performance [ ] Performance Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors. Analytics [ ] Analytics Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc. Advertisement [ ] Advertisement Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads. Others [ ] Others Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet. SAVE & ACCEPT Powered by CookieYes Logo