#417 RFE - forcing passwordmustchange attribute by non-cn=directory manager
Closed: Fixed None Opened 7 years ago by rmeggins.

https://bugzilla.redhat.com/show_bug.cgi?id=843576 (Red Hat Directory Server)

RFE Request

0. Proposed title of this feature request
Feature Request: forcing passwordmustchange attribute by non-cn=directory
manager

2. What is the nature and description of the request?
Feature Request: forcing passwordmustchange attribute by non-cn=directory
manager

3. Why does the customer need this? (List the business requirements here)
In an enterprise environment it is increasingly important that several
sub-departments are able to perform different tasks in an LDAP database. A
typical enterprise would like to give their Operations/Servicedesk department
the ability to reset user passwords when users call the Servicedesk when they
forgot theirs, but no more rights than that.

In terms of providing the aci's to a specific user for the Servicedesk this is
doable, but the 'User must change password after reset' flag in the password
policy of Directory Server only applies to resets done by the Directory
Manager. This user is akin to the 'root'/super user in Directory Manager and
this user has far too many rights for a department like Operations/Servicedesk
to handle. It poses a security risk.

An enterprise would need more flexibility with this attribute, for example set
it that several extra users trigger this flag when resetting another user's
password, or to make it in such a way that any user except the user itself
which changes the password, triggers the flag that the user must change
password at next login.

4. How would the customer like to achieve this? (List the functional
requirements here)
Functionality for forcing passwordmustchange attribute for all users.

5. For each functional requirement listed in question 4, specify how Red Hat
and the customer can test to confirm the requirement is successfully
implemented.
- Create a user, which has rights to change password for a sub-ou.
- Use above user to change password of x user, Try to login with x user.

6. Is there already an existing RFE upstream or in Red Hat bugzilla?
No

7. How quickly does this need resolved? (desired target release)
No time-line

8. Does this request meet the RHEL Bug and Feature Inclusion Criteria (please
review)
Yes

9. List the affected packages
389-ds-base

10. Would the customer be able to assist in testing this functionality if
implemented?
Yes

set default ticket origin to Community

Added initial screened field value.

Looks good to me.

Just one minor thing. Normalized, but mixed-case DN could be passed to update_pw_info. So, calling strcasecmp would be safer instead of strcmp...
{{{
645 if ((internal_op && pwpolicy->pw_must_change && (!pb->pb_conn || '''strcmp'''(target_dn, pb->pb_conn->c_dn))) ||
646 (!internal_op && pwpolicy->pw_must_change && (target_dn && bind_dn && '''strcmp'''(target_dn, bind_dn))))
}}}

Replying to [comment:8 nhosoi]:

Looks good to me.

Just one minor thing. Normalized, but mixed-case DN could be passed to update_pw_info. So, calling strcasecmp would be safer instead of strcmp...

Thanks for the review! I did test mixed case dn's and it worked fine, but just to be safe I followed your suggestion and used strcasecmp.

{{{
645 if ((internal_op && pwpolicy->pw_must_change && (!pb->pb_conn || '''strcmp'''(target_dn, pb->pb_conn->c_dn))) ||
646 (!internal_op && pwpolicy->pw_must_change && (target_dn && bind_dn && '''strcmp'''(target_dn, bind_dn))))
}}}

git merge ticket417
Updating d63ff3d..58ae034
Fast-forward
ldap/servers/slapd/pw.c | 95 ++++++++++++++++++++++-------------------------
1 files changed, 44 insertions(+), 51 deletions(-)

[mareynol@localhost servers]$ git push origin master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.37 KiB, done.
Total 6 (delta 4), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
d63ff3d..58ae034 master -> master

Ticket 458 - reverted the effect of this ticket. Now only "Password Policy Administrators" can force users to reset passwords.

Back ported this to 1.2.11

git merge passwordAdmin
Updating 8252d02..096d895
Fast-forward
ldap/schema/02common.ldif | 3 +-
ldap/servers/slapd/entry.c | 50 +++++++++++----
ldap/servers/slapd/libglobs.c | 24 ++++++-
ldap/servers/slapd/modify.c | 25 +++++---
ldap/servers/slapd/pblock.c | 6 ++
ldap/servers/slapd/proto-slap.h | 1 +
ldap/servers/slapd/pw.c | 123
+++++++++++++++++++++++++++++++++++--
ldap/servers/slapd/pw.h | 1 +
ldap/servers/slapd/slap.h | 3 +
ldap/servers/slapd/slapi-plugin.h | 32 ++++++++++
10 files changed, 236 insertions(+), 32 deletions(-)

git push origin 389-ds-base-1.2.11
Counting objects: 31, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (16/16), 3.75 KiB, done.
Total 16 (delta 14), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
8252d02..096d895 389-ds-base-1.2.11 -> 389-ds-base-1.2.11

commit 096d895
Author: Mark Reynolds mreynolds@redhat.com
Date: Wed Mar 5 15:55:31 2014 -0500

Metadata Update from @mreynolds:
- Issue assigned to mreynolds
- Issue set to the milestone: 1.3.1

2 years ago

Login to comment on this ticket.

Metadata