[imp] horde imp passwd expired change at login hook
Jan Schneider
jan at horde.org
Mon Sep 20 17:08:03 UTC 2010
Zitat von steen at ing-steen.se:
> Hello Horde list!
>
> I have one issue with the passwd module for horde, users can change
> password when they are logged in, all hooks work as expected.
>
> Problem arrives when their passwords has expired and they try to login.
>
> The users got asked to enter new password and that work, ldap password
> attribute got correctly set and also the shadowlastchange attribute is
> changed correctly.
>
> Problem 1)
> But the custom passwd hook does not get called, hence the other changes
> needed by the custom hook is not performed.
Updating expired passwords is not a passwd functionality, but tied
into the horde authentication system. Thus no passwd hooks are called.
> Problem 2)
> The user is logged in and got confirmed that password was changed and is
> logged in directly.
> (strange behavior usually users get logged out after password changes!)
How is that a problem? Make much more sense to me.
> After the login (takes very looong time now), IMP fails, the user is not
> allowed to use IMP.
>
> I did a successful work around for Problem 1 by adding code into
> /usr/share/horde/lib/Horde/Auth/ldap.php:
> /* Encrypt the new password */
> $entry['userpassword'] = $this->getCryptedPassword(
> $credentials['password'], '',
> $this->_params['encryption'],
> 'true');
> //HACK
> $passw = $credentials['password'];
> $e = shell_exec("/usr/bin/sudo /usr/local/scripts/upass.sh $newID
> $passw");
>
> But this will break further updates in future of horde...
>
> How am I supposed to continue, please assist ?
You need to use the _horde_hook_authldap hook in that case.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the imp
mailing list