Duo integrates with macOS to add two-factor authentication to macOS console logons.
Duo Authentication for macOS does not support Apple M1 ARM-based processors. Do not install Duo on these systems.
Duo Authentication for macOS add Duo two-factor authentication to macOS local console logins. Duo for MacOS doesn't add 2FA for remote SSH connections. Looking for SSH login protection? Try Duo Unix.
Once installed, Duo authentication is required for new console logons, but not when unlocking the screensaver or when an already logged-on user wakes the system from sleep.
Duo's Mac authorization plugin 1.1.0 supports macOS 10.13 (High Sierra) and later versions, which includes:
As of Duo release 1.1.0, these macOS versions were not tested and may not work in the future. Consider updating to a newer version of macOS still supported by Apple.
This application communicates with Duo's service on TCP port 443. Firewall configurations that restrict outbound access to Duo's service with rules using destination IP addresses or IP address ranges aren't recommended, since these may change over time to maintain our service's high availability. If your organization requires IP-based rules, please review this Duo KB article.
Duo for macOS supports these factor types for 2FA:
Touch ID is not a valid factor for the Duo macOS application.
Upgrading from macOS 10.x to macOS 11.0 disables Duo's Mac Logon package. You can restore Duo after updating your operating system with the
restore_after_upgrade.py script included in the Duo for macOS 1.1.0 zip file.
If you upgrade to macos 11 before installing Duo Mac Logon 1.1.0, then your currently installed Duo 2FA application becomes inactive. You must download and install Duo Mac Logon 1.1.0, which is the first release with macOS 11 support. There is no need to also run the restore script after installing Duo 1.1.0.
This is also seen when upgrading from 10.11 El Capitan to 10.12 Sierra or 10.11 El Capitan to 10.13 High Sierra. After these updates you can either restore Duo using the script or reinstall the Duo application.
OS upgrades directly from 10.12 Sierra to 10.13 High Sierra or between macOS 10 versions beyond 10.13 do not experience this issue.
For additional client security, we recommend setting a firmware password to prevent disabling Duo authentication via recovery mode.
Before installing Duo for macOS, ensure any other login mechanisms present on your Mac client support Swift 5. Installing Duo for macOS without first verifying that any other installed auth plugins support Swift 5 may prevent user logins.
Duo's macOS authorization plugin doesn't support inline self-service enrollment. Your users must be enrolled in Duo before logging in, and their Duo usernames must match the macOS username.
dscl . ls /Users | grep -v _
If the user logging in to macOS after the Duo plugin is installed does not exist in Duo, the user may not be able to log in.
We recommend using bulk enrollment or directory sync to send your users unique self-enrollment links via email. Read the enrollment documentation to learn more.
Log in to the Duo Admin Panel and navigate to Applications.
Click Protect an Application and locate the entry for macOS in the applications list. Click Protect to the far-right to configure the application and get your integration key, secret key, and API hostname. You'll need this information to complete your setup. See Protecting Applications for more information about protecting applications in Duo and additional application options.
The security of your Duo application is tied to the security of your secret key (skey). Secure it as you would any sensitive credential. Don't share it with unauthorized individuals or email it to anyone under any circumstances!
We recommend setting the New User Policy for your macOS application to Deny Access, as no unenrolled user may complete Duo enrollment via this application.
If you're not ready to enforce Duo authentication for all users of this system yet, configure the New User Policy for your macOS application to "Allow Access". This only prompts users enrolled in Duo for 2FA approval, and lets users not yet enrolled in Duo log on to the system without seeing the Duo prompt.
When you are ready to start requiring 2FA for macOS logins, update the policy applied to this application to deny access to unenrolled users as recommended.
Download and uncompress the Duo macOS plugin installer package and scripts zip archive. This zip file contains the configuration script for the Duo installer package (configure_maclogon.sh) and the Duo plugin installer and uninstaller .pkg package files.
Ensure your Mac system's time is correct. You can set your Mac to obtain the correct time automatically. Open "System Preferences" and then click "Date & Time". On the "Date & Time" tab, check the box next to "Set date and time automatically" and pick a time server for your region from the drop-down list. Click save when done.
Change to the extracted MacLogon directory and run the configuration script:
If the configuration script is in a different directory than the Duo MacLogon .pkg file, specify the full path to MacLogon-NotConfigured-1.1.0.pkg when running the script.
Supply the following information when prompted by the script:
Provide the integration key from the macOS application page in the Duo Admin Panel.
Provide the secret key from the macOS application page in the Duo Admin Panel.
|Enter API hostname||
Provide the API hostname from the macOS application page in the Duo Admin Panel.
|Should fail open||
|Should bypass 2FA when using smartcard||
|Should auto push if possible||
The configuration script creates a new deployment package with the values you specify. For example, this command configures the Duo for macOS installation package located in the same directory as the configuration script, with fail open enabled, smart card login disabled, and automatic push enabled, and then creates the deploy package MacLogon-1.1.0.pkg:
./configure_maclogon.sh /path/to/MacLogon-NotConfigured-1.1.0.pkg Duo Security Mac Logon configuration tool v1.1.0. See https://duo.com/docs/macos for documentation Enter ikey: DIXXXXXXXXXXXXXXXXX Enter skey: gdk2261xxc9c73fdxx9w73ffsi23xxbak282gebxxs Enter API Hostname: api-xxxxxxxx.duosecurity.com Should fail open (true or false): true Should bypass 2FA when using smartcard (true or false): false Should auto push if possible (true or false): true Modifying ./MacLogon-NotConfigured-1.1.0.pkg... Updating config.plist ikey, skey, host, fail_open, smartcard_bypass, and auto_push config... Finalizing package, saving as ./MacLogon-1.1.0.pkg Cleaning up temp files... Done! The package ./MacLogon-1.1.0.pkg has been configured for your use.
Double-click the newly-created Duo MacLogon deploy .pkg file to start installation. Follow the prompts to select the destination disk and enter the sudo password when prompted by the installer.
You'll need to run the script again if you want to change any of the configuration values, then reinstall the package and restart your Mac for the change to take effect.
If you want to verify the Duo MacLogon application settings you can view the
/private/var/root/Library/Preferences/com.duosecurity.maclogon.plist file. This file is read-only for administrators only.
$ sudo cat /private/var/root/Library/Preferences/com.duosecurity.maclogon.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>apiurl</key> <string>api-xxxxxxxx.duosecurity.com</string> <key>fail_open</key> <true/> <key>ikey</key> <string>DIXXXXXXXXXXXXXXXXX</string> <key>skey</key> <string>gdk2261fhc9c73fdjc9w73ffsi23gdbak282gebsks</string> <key>smartcard_bypass</key> <true/> </dict> </plist>
To test your setup, attempt to log in to your newly-configured system as a user enrolled in Duo. The Duo Prompt appears after you successfully submit your macOS credentials.
Select any available factor to verify your identity to Duo:
If you'd like to remove Duo authentication for macOS from your system, double-click the MacLogon-Uninstaller-1.1.0.pkg package included in the Duo MacLogin zip file and follow the installer prompts.
If upgrading macOS to a new major version (like macOS 10 to 11) removed Duo logon protection from your system, restore it with the
restore_after_upgrade.py script included in the Duo MacLogon zip file.
In a Terminal window, change to the extracted MacLogon directory and run the restore script:
sudo python restore_after_upgrade.py