Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1523090

Summary: Default configuration for opensc is not usable
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Jelen <jjelen>
Component: pam_pkcs11Assignee: Bob Relyea <rrelyea>
Status: CLOSED ERRATA QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: nmavrogi, rpattath
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pam_pkcs11-0.6.2-29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:35:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1563596    

Description Jakub Jelen 2017-12-07 08:25:54 UTC
Description of problem:
Per various reports [0] and investigation, the default configuration for OpenSC in pam_pkcs11.conf does not work out of the box just by switching use_pkcs11_module option. It is already documented in the KBA [1], but fixing it in the package itself would make life easier.

Please, add

  nss_dir = /etc/pki/nssdb;

to the opensc section in /etc/pam_pkcs11/pam_pkcs11.conf

Version-Release number of selected component (if applicable):
pam_pkcs11-0.6.2-28.el7

Additional info:
[0] https://bugzilla.redhat.com/show_bug.cgi?id=1473418
[1] https://access.redhat.com/articles/3034441

Comment 5 Bob Relyea 2018-06-21 17:45:10 UTC
fixed in pam_pkcs11-0.6.2-29

Comment 7 Roshni 2018-07-09 20:45:58 UTC
[root@dhcp129-188 ~]# rpm -qi pam_pkcs11
Name        : pam_pkcs11
Version     : 0.6.2
Release     : 30.el7
Architecture: x86_64
Install Date: Mon 09 Jul 2018 04:44:20 PM EDT
Group       : System Environment/Base
Size        : 1101020
License     : LGPLv2+
Signature   : RSA/SHA256, Fri 22 Jun 2018 12:41:17 PM EDT, Key ID 199e2f91fd431d51
Source RPM  : pam_pkcs11-0.6.2-30.el7.src.rpm
Build Date  : Thu 21 Jun 2018 07:47:56 PM EDT
Build Host  : x86-017.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://www.opensc-project.org/pam_pkcs11
Summary     : PKCS #11/NSS PAM login module


/etc/pam_pkcs11/pam_pkcs11.conf contains

pkcs11_module opensc {
    module = opensc-pkcs11.so;
    description = "OpenSC PKCS#11 module";
    # Slot-number to use. One for the first, two for the second and so
    # on. The default value is zero which means to use the first slot
    # with an available token.
    slot_num = 0;

    # Path to the directory where the NSS CA certificate database is stored.
    # you can mange the certs in this database with the certutil command in
    # the package nss-tools
    nss_dir = /etc/pki/nssdb;

    # Sets the Certificate Policy, (see above)
    cert_policy = ca, signature;
  }

Comment 9 errata-xmlrpc 2018-10-30 11:35:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3258