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  >
article

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

Centrify DirectControl ,   Centrify Identity Service, Mac Edition ,  

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.

Question:

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?


Answer:

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

auth sufficient pam_pkcs11.so

On the server, run:

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


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


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.