Skip to content

Conversation

@scholl
Copy link

@scholl scholl commented Feb 1, 2026

I include the handling for the pwdReset attribute wenn ppolicy is included to ensure a password reset via Linux SSSD client.

I tested with openldap 2.6 and it worked quite fine. Can someone ensure that it has no influence when ppolicy is not used.

@leenooks
Copy link
Owner

leenooks commented Feb 1, 2026

Hi @scholl thanks for taking the time to create this PR.

I like what you've done, and would like to implement something to support this. My concern is it is specific, and assumes, an LDAP server implements ppolicy and makes available an attribute pwdReset - which I know some servers dont.

In my quick research on this - servers that do implement password policy present an ldap control to indicate it. I'd like to research querying for that control (I think it is 1.3.6.1.4.1.42.2.27.8.5.1) and make available this capability if the LDAP server presents it.

I've also added some comments for you to review as I looked through your code. Today I pushed some commits to master that I've been working on, which will require you to rebase your work (sorry :).

@scholl
Copy link
Author

scholl commented Feb 1, 2026

Hi @leenooks,

do you already post youre comments? I mad another adjustments because of the changes on the master branch and fixes some little bugs --> when trying to set the pwdReset from true to false there was a wrong behaviour.

how shall be proceed? We need the querying for the ppolicy? And only use it when available?

@leenooks
Copy link
Owner

leenooks commented Feb 1, 2026

do you already post youre comments?

I did - do they not show for you on the conversation tab? I thought you'd get an email as well...

$o->{$ao->name} = [Entry::TAG_NOTAG=>['']];

// Add ppolicy virtual attributes for user entries
$this->addPPolicyAttributesIfNeeded($o);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this and will need to review it in more detail - not all server implement ppolicy and/or pwdreset attributes.


// Add ppolicy operational attributes for user entries
if ($this->isUserEntry()) {
$ppolicyAttrs = ['pwdReset'];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all LDAP servers implement pwdReset, so this needs to be externalised as a configurable item if the functionality can be supported by other ldapservers, and they use a different attribute name, eg: pwdLastSet.

*/
public function isUserEntry(): bool
{
static $userObjectClasses = ['posixaccount','inetorgperson','person','account','organizationalperson'];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be an external configurable item, to allow for users who (also) use custom schemas.

@scholl scholl requested a review from leenooks February 3, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants