[sork] Re: passwd with sql
Doug Curtis
doug.curtis at world-mail.org
Sat Mar 19 07:15:36 PST 2005
Quoting Martin Lohmeier <blackm at ferris.dyndns.info>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Doug Curtis wrote:
> | Howdy all.
> |
> | Passwd is working fine as long as I specify the entire username. I
> | host a number of virtual domains with mysql and postfix. The
> | usernames are all in the format USER at DOMAIN The passwd module (or
> | maybe horde) seems to be striping off the @DOMAIN portion of the
> | username in the prefilled username field.
>
> I'm using passwd from CVS (4 days old) and it's working fine here. Users
> (e.g user at domain.tld) and passwords are stored in mysql and I have no
> problem changing the password - no hook is used.
>
> Here is my backend, maybe it helps:
>
> $backends['sql'] = array (
> ~ 'name' => 'Horde Authentication',
> ~ 'preferred' => '',
> ~ 'password policy' => array(
> ~ 'minLength' => 3,
> ~ 'maxLength' => 80,
> ~ 'maxSpace' => 0,
> ~ 'minUpper' => 1,
> ~ 'minLower' => 1,
> ~ 'minNumeric' => 1,
> ~ ),
> ~ 'driver' => 'sql',
> ~ 'params' => array(
> ~ 'phptype' => 'mysql',
> ~ 'hostspec' => 'localhost',
> ~ 'username' => 'user',
> ~ 'password' => SECRET,
> ~ 'encryption' => 'md5-hex',
> ~ 'database' => 'user',
> ~ 'table' => 'horde_users',
> ~ 'user_col' => 'user_uid',
> ~ 'pass_col' => 'user_pass',
> ~ 'show_encryption' => false
> ~ )
> );
>
> My horde auth config:
>
> $conf['sql']['phptype'] = 'mysql';
> $conf['sql']['persistent'] = false;
> $conf['sql']['protocol'] = 'unix';
> $conf['sql']['hostspec'] = 'localhost';
> $conf['sql']['username'] = 'user';
> $conf['sql']['password'] = SECRET;
> $conf['sql']['database'] = 'user';
> $conf['sql']['charset'] = 'iso-8859-1';
> $conf['auth']['admins'] = array('root');
> $conf['auth']['checkip'] = true;
> $conf['auth']['params']['driverconfig'] = 'horde';
> $conf['auth']['params']['encryption'] = 'md5-hex';
> $conf['auth']['params']['show_encryption'] = false;
> $conf['auth']['driver'] = 'sql';
>
> by, Martin
Thanks all. I got a response privately and here is what I put in the
hooks.php file:
if (!function_exists('_passwd_hook_default_username')) {
function _passwd_hook_default_username($userid) {
return Auth::getAuth();
}
}
This will help me with other parts of horde.
Doug
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the sork
mailing list