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 1771439 - Different password expiration message for LDAP users with and without ObjectClass ShadowAccount
Summary: Different password expiration message for LDAP users with and without ObjectC...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss-pam-ldapd
Version: 7.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Tomas Halman
QA Contact: Filip Dvorak
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-12 11:34 UTC by Filip Dvorak
Modified: 2020-09-29 20:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 20:12:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3969 0 None None None 2020-09-29 20:13:03 UTC

Description Filip Dvorak 2019-11-12 11:34:19 UTC
Description of problem:
There is a small issue (different letter P-p) in a password expiration message for LDAP users with and without ObjectClass ShadowAccount.   

The message for a user w/o ObjectClass ShadowAccount: Password will expire in 9 days
The message for a user with objectClass ShadowAccount: password will expire in 9 days

Version-Release number of selected component (if applicable):
nss-pam-ldapd-0.8.13-22.el7.x86_64
RHEL-7.8

How reproducible:
always

Steps to Reproduce:

1. Add the following LDAP users into LDAP db:
user1 without ShadowAccount
dn: uid=user1,ou=People,dc=my-domain,dc=com
uid: user1
cn: user1
objectClass: account
objectClass: posixAccount
objectClass: top
loginShell: /bin/bash
uidNumber: 2001
gidNumber: 20000
homeDirectory: /home/ldap/user1
gecos: user1
userPassword:: user1

user2 with ShadowAccount
dn: uid=user2,ou=People,dc=my-domain,dc=com
uid: user2
cn: user2
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: dXNlcjI=
shadowLastChange: 18198
shadowMax: 15
shadowWarning: 10
loginShell: /bin/bash
uidNumber: 2002
gidNumber: 20000
homeDirectory: /home/ldap/user2
gecos: user2

2.Edit the nslcd.conf file to configure the connection settings to the LDAP server and add the following option into this file "pam_authc_ppolicy YES"

3.Set ppolicy to send expiration message
pwdMinAge: 0
pwdMaxAge: 864000
pwdExpireWarning: 864000

4. Check that the notifications are sent when using the relevant LDAP control:
ldapsearch -xLLL  -h localhost -b ou=People,dc=my-domain,dc=com -D uid=user1,ou=People,dc=my-domain,dc=com -w user1 uid=user1 -e ppolicy'
ldap_bind: Success (0) (Password expires in 863999 seconds) 

ldapsearch -xLLL  -h localhost -b ou=People,dc=my-domain,dc=com -D uid=user2,ou=People,dc=my-domain,dc=com -w user2 uid=user2 -e ppolicy'
ldap_bind: Success (0) (Password expires in 800 seconds)

5.SSH to the user@localhost and check whether the notifications are sent or not:
++++++++++++++++++++++++++++++++++++
ssh user1@localhost
user1@localhost's password: 

Password will expire in 9 days
Last login: Mon Nov 11 09:09:04 2019 from localhost

++++++++++++++++++++++++++++++++++++
ssh user2@localhost
user2@localhost's password: 

expect: Password sent

Warning: your password will expire in 2 days
password will expire in 2 days

Actual results:
The message for a user w/o ObjectClass ShadowAccount: Password will expire in 9 days
The message for a user with objectClass ShadowAccount: password will expire in 2 days

Expected results:
The message about password expiration should be the same for both users (with a letter P):
Password will expire in 9 days

Additional info:
You can find configuration files (user.ldif, ppolicyrule.ldif, nslcd.conf) in the following test. Feel free to use it for checking this issue.:
TC#603962: /CoreOS/nss-pam-ldapd/Regression/bz1612543-password-expiration-is-not-send-shadowAccount

Comment 9 errata-xmlrpc 2020-09-29 20:12:55 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 (nss-pam-ldapd bug fix and enhancement update), 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-2020:3969


Note You need to log in before you can comment on or make changes to this bug.