So I've done a lot of testing the past week on this, and it seems that opensc_pkcs11 only reads the very first CN on a certificate which is very annoying. I've been generating the certs via AD which maps the CN the user is in as well as the CN of the user. So Centos/Ubuntu reads the cert as being for "Users" and not for "bfrown".

Now if I write the certificate on my FreeIPA server I can load it into the userCertificate attribute and it correctly recognizes and authenticates the cert against the user. I figured I could do this via the userCertificate attribute on AD as well, so I did an ldapmodify and loaded it onto "bfrown", I can see it if I do a Get-ADUser and view the properties but it's not verifying it at all. I have my sssd.conf with [pam] set to pam_cert_auth = True and ldap_user_certificate = userCertificate:binary but it still fails to properly pop up a smartcard login on GDM gui.

The certificates correctly map to their users in the context of, if the cert is for CN=Users,CN=bfrown and it can map "bfrown" to a user on the linux system or through SSSD against the domain, it will login as "bfrown", and you can't use that same cert to login as "CN=Users,CN=notbfrown" on the same domain...I just hate that it says "Welcome Users!" at the prompt and feel there has to be same way to make it read the last CN in the cert instead of the very first or something...

Looking at .crt on Windows it reads as "CN=btown,CN=Users,DC=example,DC=com" but on linux it's reversed in being "DC=com,DC=example,CN=Users,CN=btown". Opensc grabs that first CN and just uses that as the prompt when issuing a "Welcome".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.