Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >

KB-2436: How to configure sudo to work with Smart Card on Mac OS

Authentication Service ,   Mac & PC Management Service ,  

11 July,16 at 07:45 PM

Applies to: Centrify DirectControl 5.0.2 and higher on CentOS 6.x and Mac OS X platforms.


Logging in and unlocking the screen with a Smart Card works.

However using sudo prompts for a password and instead of a Smart Card.

How can sudo be configured to work with a Smart Card?


Edit /etc/pam.d/sudo and add:

auth sufficient

On the server, run:

$ sudo echo test 
Found the Smart card.
Welcome cninformation!
Smart card PIN: (enter pin)

When no CAC is inserted, it prompts for AD password.
$sudo echo test 
Windows Password: 

For Mac OS, an alternative workaround is to modify the sudoers file and add "NOPASSWD" for password:

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.