For a clear password have this example:
cram_md5:
driver = cram_md5
public_name = CRAM-MD5
server_secret = \
${lookup mysql{SELECT clear FROM passwd \
WHERE id='$1'}{$value}fail}
server_set_id = $1
Question: How to use only no clear bd? The field is "pass_md5". In other auth,
i'm use (this configuration is OK and tested):
----
#main
MYSQL_PASSWD_MD5_LOGIN = SELECT popbox.password_md5 from popbox LEFT JOIN
domain ON ( popbox.domain_name = domain.domain_name ) where popbox.l
ocal_part='${quote_mysql:${extract {1}{@%!}{$1}}}' and
popbox.domain_name='${quote_mysql:${extract {2}{@%!}{$1}}}' AND
domain.ativo='1' AND popb
ox.ativo='1'
MYSQL_PASSWD_MD5_PLAIN = SELECT popbox.password_md5 from popbox LEFT JOIN
domain ON ( popbox.domain_name = domain.domain_name ) where popbox.l
ocal_part='${quote_mysql:${extract {1}{@%!}{$2}}}' and
popbox.domain_name='${quote_mysql:${extract {2}{@%!}{$2}}}' AND
domain.ativo='1' AND popb
ox.ativo='1'
---
begin authenticators
# PLAIN: user e pass codificados em base64-coded - usado pelo Netscape
fixed_plain:
driver = plaintext
public_name = PLAIN
server_condition = "${if eq {${if match{$2}{@}{yes}{no}}}{yes}\
{${if and{\
{!eq {$2}{}} {!eq {$3}{}} \
{eq {${lookup mysql {MYSQL_PASSWD_MD5_PLAIN}{$value}{*:*}}}{${md5:$3}}}
\
}{yes}{no}}}\
{${if pam{$2:${sg{$3}{:}{::}}}{yes}{no}}}}"
server_set_id = $2
# LOGIN: codificacao em md5-encoded com usado pelo Outlook Express
fixed_login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = "${if eq {${if match{$1}{@}{yes}{no}}}{yes}\
{${if and{\
{!eq {$1}{}} {!eq {$2}{}} \
{eq {${lookup mysql {MYSQL_PASSWD_MD5_LOGIN}{$value}{*:*}}}{${md5:$2}}}
\
}{yes}{no}}}\
{${if pam{$1:${sg{$2}{:}{::}}}{yes}{no}}}}"
server_set_id = $1
Cordialmente, Silmar A. Marca
GrupoGSN - Desenvolvimento, Implantação e Verificação de Servidores
Profissionais baseados em Linux/Novell
http://www.grupogsn.com.br/~marca/
------------------------------------------------------------
Se algo não lhe faz mal (fisico, moral ou psicologicamente),
experimente! O máximo e você perder tempo! E tempo, e
o que você tem a vida toda pra perder.....
Mais vale um instante de prazer que uma eternidade fútil!
------------------------------------------------------------