Here is what I have in my /etc/pam.d/pop file in Redhat 7.2:



#%PAM-1.0
auth       required     /lib/security/pam_mysql.so user=xxx passwd=xxx 
db=school table=user usercolumn=userid passwdcolumn=passwd

account    required     /lib/security/pam_mysql.so user=xxx passwd=xxx 
db=school table=user usercolumn=userid passwdcolumn=passwd


Also make sure that the cyrus user can read the pam file. Are the 
permissions the same on both the imap and pop pam files?



Dustin Puryear wrote:
> At 09:48 PM 5/1/2002 -0500, you wrote:
> 
>> Okay, one final try. Is anyone in the world that happens to be on this 
>> list using mysql with cyrus? I can't be the only one. If you do exist, 
>> and I'm happy to see that you do, I
> 
> 
> Okay, at some point I realized I'm wasn't getting anywhere, so I 
> abandoned trying to use Cyrus' mysql support to authenticate users 
> directly against a mysql database. Instead, I'm falling back to the pam 
> method via pam_mysql, which seems to have been successful from the 
> responses I've gotten.
> 
> Unfortunately, I again have a problem.
> 
> I have the pam solution WORKING for imap authentication, but not for 
> pop3 authentication. Weird, I know. First, let me show you the test 
> connections:
> 
> Here you can see that imap works:
> 
> freebsd# telnet localhost 143
> Trying ::1...
> Connected to localhost.
> Escape character is '^]'.
> * OK freebsd.dpbox.dhs.org Cyrus IMAP4 v2.0.16 server ready
> a0001 login dom0001 password
> a0001 OK User logged in
> May  1 21:57:03 freebsd imapd[5489]: login: localhost[::1] dom0001 
> plaintext
> ^]
> telnet> quit
> Connection closed.
> 
> But pop3 fails:
> 
> freebsd# telnet localhost 110
> Trying ::1...
> Connected to localhost.
> Escape character is '^]'.
> +OK <[EMAIL PROTECTED]> Cyrus POP3 v2.0.16 
> server ready
> user dom0001
> +OK Name is a valid mailbox
> pass password
> May  1 21:57:39 freebsd pop3d[5491]: login: localhost[::1] dom0001 
> plaintext
> -ERR Invalid login
> ^]
> telnet> quit
> Connection closed.
> 
> Well, that's no good. So, I must have configured pam wrong. Now, if 
> anyone here has played with pam they know about the pam-service-guessing 
> game. It's actually quite fun. In this game you get to guess the service 
> name that a program will use; it's not always what you think it will be.
> 
> So, I initially had a service defined using the service name 'pop'. 
> Well, that's not working, so I created a configuration for 'pop', 
> 'pop3', and 'pop3d', a sample being shown below:
> 
> pop3d auth sufficient pam_mysql.so user=mail passwd=secret \
>                                 host=localhost db=mail table=accountuser 
> usercolumn=username \
>                                 passwdcolumn=password crypt=0
> pop3d account required pam_mysql.so user=mail passwd=secret \
>                                 host=localhost db=mail table=accountuser 
> usercolumn=username \
>                                 passwdcolumn=password crypt=0
> 
> Now, the imap configuration has the same format and information:
> 
> imap auth sufficient pam_mysql.so user=mail passwd=secret \
>                                 host=localhost db=mail table=accountuser 
> usercolumn=username \
>                                 passwdcolumn=password crypt=0
> imap account required pam_mysql.so user=mail passwd=secret \
>                                 host=localhost db=mail table=accountuser 
> usercolumn=username \
>                                 passwdcolumn=password crypt=0
> 
> The difference between imap and pop? imap works. Any ideas?
> 
> Regards, Dustin
> 
> 
> ---
> Dustin Puryear <[EMAIL PROTECTED]>
> UNIX and Network Consultant
> http://members.telocity.com/~dpuryear
> PGP Key available at http://www.us.pgp.net
> In the beginning the Universe was created.
> This has been widely regarded as a bad move. - Douglas Adams
> 



Reply via email to