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 1044157 - Some updates of "passwordgraceusertime" are useless when updating "userpassword"
Summary: Some updates of "passwordgraceusertime" are useless when updating "userpassword"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 21:32 UTC by Nathan Kinder
Modified: 2020-09-13 20:34 UTC (History)
2 users (show)

Fixed In Version: 389-ds-base-1.3.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 09:31:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 708 0 None None None 2020-09-13 20:33:59 UTC
Red Hat Product Errata RHSA-2015:0416 0 normal SHIPPED_LIVE Important: 389-ds-base security, bug fix, and enhancement update 2015-03-05 14:26:33 UTC

Description Nathan Kinder 2013-12-17 21:32:59 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47371

Whatever is the password policy (local or default), when updating the "userpassword" the password policy attribute "passwordgraceusertime" is reset to 0. In some cases it is useless (if the value was already 0). In addition in a customer case where password policy is default, retroCL records this unexpected update.


Test case:
Create an instance and a test entry with a password


{{{
ldapsearch -LLL -h localhost -p 2011 -D "cn=directory manager" -w Secret123 -b "dc=com" uid=xxx passwordgraceusertime
dn: uid=xxx,dc=com
passwordgraceusertime: 0

ldapmodify -h localhost -p 2011 -D "cn=directory manager" -w Secret123 
dn: uid=xxx,dc=com
changetype: modify
replace: userpassword
userpassword: secret12


(gdb) break pw_apply_mods
(gdb) c
(gdb) where
#0  pw_apply_mods (sdn=0x7f50cc000d70, mods=0x7f50eb7f9690) at ldap/servers/slapd/pw_retry.c:263
#1  0x00007f5108e2b3ff in update_pw_info (pb=0x7f50eb7fdaa0, old_pw=0x0) at ldap/servers/slapd/pw.c:686
#2  0x00007f5108e0c918 in op_shared_modify (pb=0x7f50eb7fdaa0, pw_change=1, old_pw=0x0) at ldap/servers/slapd/modify.c:1091
#3  0x00007f5108e0b084 in do_modify (pb=0x7f50eb7fdaa0) at ldap/servers/slapd/modify.c:415
#4  0x0000000000414d86 in connection_dispatch_operation (conn=0x7f5100330e10, op=0x12021d0, pb=0x7f50eb7fdaa0)
    at ldap/servers/slapd/connection.c:652
#5  0x00000000004169ab in connection_threadmain () at ldap/servers/slapd/connection.c:2479
#6  0x0000003426428afd in _pt_root (arg=0x1216d30) at ../../../mozilla/nsprpub/pr/src/pthreads/ptthread.c:191
#7  0x00000035d7007d14 in start_thread (arg=0x7f50eb7fe700) at pthread_create.c:309
#8  0x00000035d6cf168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

(gdb) break ldbm_back_modify
(gdb) c

(gdb) where
#0  ldbm_back_modify (pb=0x7f50eb7f9390) at ldap/servers/slapd/back-ldbm/ldbm_modify.c:541
#1  0x00007f5108e0c871 in op_shared_modify (pb=0x7f50eb7f9390, pw_change=0, old_pw=0x0) at ldap/servers/slapd/modify.c:1075
#2  0x00007f5108e0b643 in modify_internal_pb (pb=0x7f50eb7f9390) at ldap/servers/slapd/modify.c:627
#3  0x00007f5108e0b220 in slapi_modify_internal_pb (pb=0x7f50eb7f9390) at ldap/servers/slapd/modify.c:482
#4  0x00007f5108e3000b in pw_apply_mods (sdn=0x7f50cc00e810, mods=0x7f50eb7f9690) at ldap/servers/slapd/pw_retry.c:274
#5  0x00007f5108e2b3ff in update_pw_info (pb=0x7f50eb7fdaa0, old_pw=0x0) at ldap/servers/slapd/pw.c:686
#6  0x00007f5108e0c918 in op_shared_modify (pb=0x7f50eb7fdaa0, pw_change=1, old_pw=0x0) at ldap/servers/slapd/modify.c:1091
#7  0x00007f5108e0b084 in do_modify (pb=0x7f50eb7fdaa0) at ldap/servers/slapd/modify.c:415
#8  0x0000000000414d86 in connection_dispatch_operation (conn=0x7f5100330e10, op=0x12021d0, pb=0x7f50eb7fdaa0)
    at ldap/servers/slapd/connection.c:652
#9  0x00000000004169ab in connection_threadmain () at ldap/servers/slapd/connection.c:2479
#10 0x0000003426428afd in _pt_root (arg=0x1216d30) at ../../../mozilla/nsprpub/pr/src/pthreads/ptthread.c:191
#11 0x00000035d7007d14 in start_thread (arg=0x7f50eb7fe700) at pthread_create.c:309
#12 0x00000035d6cf168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

...
(gdb) 
541				if (modify_apply_check_expand(pb, operation, mods, e, ec, &postentry,
(gdb) print mods[0]->mod_type
$2 = 0x7f50cc007890 "passwordgraceusertime"
(gdb) print mods[0]->mod_vals->modv_bvals->bv_len
$6 = 1
(gdb) print mods[0]->mod_vals->modv_bvals->bv_val
$7 = 0x7f50cc0077b0 "0"




}}}

Comment 2 Amita Sharma 2014-12-26 12:43:50 UTC
[root@dhcp201-126 en]# ldapmodify -D "cn=directory manager" -w Secret123 -p 389 -h localhost << EOF
> dn: uid=ami,dc=example,dc=com
> changetype: modify
> replace: userpassword
> userpassword: secret12
> EOF
modifying entry "uid=ami,dc=example,dc=com"

[root@dhcp201-126 en]# ldapsearch -LLL -D "cn=directory manager" -w Secret123 -p 389 -h localhost -b  "uid=ami,dc=example,dc=com" passwordgraceusertime
dn: uid=ami,dc=example,dc=com
passwordgraceusertime: 0

[root@dhcp201-126 en]# ldapsearch -LLL -D "cn=directory manager" -w Secret123 -p 389 -h localhost -b  "uid=ami1,dc=example,dc=com" passwordgraceusertime
dn: uid=ami1,dc=example,dc=com

[root@dhcp201-126 en]# ldapmodify -D "cn=directory manager" -w Secret123 -p 389 -h localhost << EOFdn: uid=ami1,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secret12
EOF

modifying entry "uid=ami1,dc=example,dc=com"

[root@dhcp201-126 en]# ldapsearch -LLL -D "cn=directory manager" -w Secret123 -p 389 -h localhost -b  "uid=ami1,dc=example,dc=com" passwordgraceusertime
dn: uid=ami1,dc=example,dc=com
passwordgraceusertime: 0

NOTE :: passwordgraceusertime does not get set automatically, it gets set as 0 only when changing user password.
Hence VERIFIED.

Comment 4 errata-xmlrpc 2015-03-05 09:31:49 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://rhn.redhat.com/errata/RHSA-2015-0416.html


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