postfix, saslauthd, pam_mysql - wrong username is being send

From: Martin Hudec (corwin_at_aeternal.net)
Date: 07/30/04

  • Next message: Ion-Mihai Tetcu: "Re: backspace and delete keys behavior"
    Date: Fri, 30 Jul 2004 12:01:15 +0200
    To: freebsd-questions@freebsd.org
    
    
    

    Hello,

    I have postfix set up using saslauthd to authenticate against
    mysql database with pam_mysql. Usernames are stored in
    database like "user@domain.tld" (username with @ and domain
    is used because I have multiple domains virtualhosted there).
    But I am unable to authenticate because I am not getting
    whole username sent. I am getting just "username", not
    whole "username@domain.tld). Can anyone help and tell me how to
    get whole username to select from database please?

    In pam.conf:
    smtpd auth required pam_mysql.so user=postfix passwd=****** db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1
    smtp auth required pam_mysql.so user=postfix passwd=****** db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1

    In smtpd.conf:
    pwcheck_method: saslauthd
    mech_list: plain login

    In auth.log:
    Jul 30 11:46:02 amber postfix/smtpd[58005]: sql_select option missing
    Jul 30 11:46:02 amber postfix/smtpd[58005]: auxpropfunc error no mechanism available
    Jul 30 11:46:40 amber saslauthd[57854]: pam_mysql: select returned more than one result
    Jul 30 11:46:40 amber saslauthd[57854]: do_auth : auth failure: [user=taker] [service=smtp] [realm=aeternal.net] [mech=pam] [reason=PAM auth error]

    NOTE: sql_select option missing and auxpropfunc error are there maybe
    because I miss some things in smtpd.conf. Correct?

    In maillog:
    Jul 30 11:46:40 amber postfix/smtpd[58005]: connect from unknown[192.168.0.39]
    Jul 30 11:46:40 amber postfix/smtpd[58005]: setting up TLS connection from unknown[192.168.0.39]
    Jul 30 11:46:40 amber postfix/smtpd[58005]: TLS connection established from unknown[192.168.0.39]: TLSv1 with cipher RC4-MD5 (128/128 bits)
    Jul 30 11:46:40 amber postfix/smtpd[58005]: warning: SASL authentication failure: Password verification failed
    Jul 30 11:46:40 amber postfix/smtpd[58005]: warning: unknown[192.168.0.39]: SASL PLAIN authentication failed
    Jul 30 11:46:40 amber postfix/smtpd[58005]: lost connection after AUTH from unknown[192.168.0.39]
    Jul 30 11:46:40 amber postfix/smtpd[58005]: disconnect from unknown[192.168.0.39]

    In mysql.log:
    040730 11:46:40 240 Connect postfix@localhost on postfix
                        240 Init DB postfix
                        240 Query SELECT password FROM mailbox WHERE username='taker'
                        240 Quit

            Thank you,

            Martin

    -- 
    Martin Hudec            | corwin at aeternal.net
                            | corwin at web.markiza.sk
    http://www.aeternal.net | cell +421 907 303 393
    
    



  • Next message: Ion-Mihai Tetcu: "Re: backspace and delete keys behavior"

    Relevant Pages

    • Re: Problem in authentication using asp.net for a webpage
      ... indicative of password and username not matching? ... SQL statement must be surrounded by single quotes. ... Did you think to try running your sql statement against the database outside ... >I am trying to implement a simple way to authenticate users before ...
      (microsoft.public.dotnet.framework.aspnet)
    • ASP.Net not impersonating for WSE 2.0
      ... I have several web services that use WSE to authenticate calling users. ... I use a UsernameToken that validates the sent username and password ... against our SqlServer database. ...
      (microsoft.public.dotnet.framework.aspnet.webservices)
    • ASP.Net not impersonating for WSE 2.0 AuthenticateToken method
      ... I have several web services that use WSE to authenticate calling users. ... I use a UsernameToken that validates the sent username and password ... against our SqlServer database. ...
      (microsoft.public.dotnet.framework.aspnet.webservices)
    • Re: Pathname to access and usernames in shortcut
      ... >> network drive (for maintenance reasons initially, ... >> using usernames but no passwords. ... change their passwords within the access database (they won't know how ... >> gets the current username from the system and then calls access (via the ...
      (microsoft.public.access.security)
    • Re: Ignoring Case on directories
      ... clicking on that person's username, which resolves the case issue, but ... personalized settings, etc)? ... I don't know how I could accomplish this in a database. ... folders for themselves. ...
      (comp.lang.php)