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 CentOS

Authentication Service ,  

29 April,19 at 11:28 PM

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

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