This is the file that I have in /etc/pam.d/imap, I changed "secret"  for my own password.

auth sufficient pam_mysql.so user=mail passwd=secret host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time

#auth sufficient pam_unix_auth.so

account required pam_mysql.so user=mail passwd=secret host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time

#account  sufficient       pam_unix_acct.so

And what it is in /var/log/messages

Feb 20 11:59:27 linux ctl_cyrusdb[1286]: archiving database file: /var/imap/annotations.db
Feb 20 11:59:27 linux ctl_cyrusdb[1286]: DBERROR: error listing log files: DB_NOTFOUND: No matching key/data pair found
Feb 20 11:59:27 linux ctl_cyrusdb[1286]: DBERROR: archive /var/imap/db: cyrusdb error
Feb 20 11:59:27 linux ctl_cyrusdb[1286]: archiving database file: /var/imap/mailboxes.db
Feb 20 11:59:27 linux ctl_cyrusdb[1286]: DBERROR: error listing log files: DB_NOTFOUND: No matching key/data pair found
Feb 20 11:59:27 linux ctl_cyrusdb[1286]: DBERROR: archive /var/imap/db: cyrusdb error
Feb 20 11:59:27 linux ctl_cyrusdb[1286]: done checkpointing cyrus databases
Feb 20 11:59:27 linux master[1279]: process 1286 exited, status 1
feb 20 12:00:55 linux su: (to cyrus) lbarron on /dev/pts/3
feb 20 12:00:55 linux su: pam_unix2: session started for user cyrus, service su
Feb 20 12:01:44 linux master[1370]: about to exec /usr/cyrus/bin/imapd
Feb 20 12:01:44 linux imap[1370]: executed
Feb 20 12:01:44 linux imap[1370]: skiplist: recovered /var/imap/annotations.db (0 records, 144 bytes) in 0 seconds
Feb 20 12:01:44 linux imap[1370]: accepted connection
Feb 20 12:01:47 linux imap[1370]: badlogin: localhost [::1] PLAIN [SASL(-4): no mechanism available: security flags do not match required
]
feb 20 12:01:50 linux perl: No worthy mechs found
Feb 20 12:01:53 linux saslauthd[1281]: pam_sm_authenticate called.
Feb 20 12:01:53 linux saslauthd[1281]: dbuser changed.
Feb 20 12:01:53 linux saslauthd[1281]: dbpasswd changed.
Feb 20 12:01:53 linux saslauthd[1281]: host changed.
Feb 20 12:01:53 linux saslauthd[1281]: database changed.
Feb 20 12:01:53 linux saslauthd[1281]: table changed.
Feb 20 12:01:53 linux saslauthd[1281]: usercolumn changed.
Feb 20 12:01:53 linux saslauthd[1281]: passwdcolumn changed.
Feb 20 12:01:53 linux saslauthd[1281]: crypt changed.
Feb 20 12:01:53 linux saslauthd[1281]: logtable changed.
Feb 20 12:01:53 linux saslauthd[1281]: logmsgcolumn changed.
Feb 20 12:01:53 linux saslauthd[1281]: logusercolumn changed.
Feb 20 12:01:53 linux saslauthd[1281]: loghostcolumn changed.
Feb 20 12:01:53 linux saslauthd[1281]: logpidcolumn changed.
Feb 20 12:01:53 linux saslauthd[1281]: logtimecolumn changed.
Feb 20 12:01:53 linux saslauthd[1281]: db_connect  called.
Feb 20 12:01:54 linux saslauthd[1281]: returning 0 .
Feb 20 12:01:54 linux saslauthd[1281]: db_checkpasswd called.
Feb 20 12:01:54 linux saslauthd[1281]: pam_mysql: where clause =
Feb 20 12:01:54 linux saslauthd[1281]: SELECT password FROM accountuser WHERE username='cyrus'
Feb 20 12:01:54 linux saslauthd[1281]: returning 7 .
Feb 20 12:01:54 linux saslauthd[1281]: returning 7 after db_checkpasswd.
Feb 20 12:01:54 linux saslauthd[1281]: DEBUG: auth_pam: pam_authenticate failed: Permission denied
Feb 20 12:01:54 linux saslauthd[1281]: do_auth         : auth failure: [user=cyrus] [service=imap] [realm=] [mech=pam] [reason=PAM auth error]
Feb 20 12:01:54 linux imap[1370]: badlogin: localhost [::1] plaintext cyrus SASL(-13): authentication failure: checkpass failed

Where do I need to look for the Permission denied?

Thi is what I obtain with ths imtest command:it seems to be that does not find the authentications methods, I do not know.

> imtest -m login -p imap -a test localhost
S: * OK linux.local Cyrus IMAP4 v2.2.3 server ready
C: C01 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE
S: C01 OK Completed
Please enter your password:
C: L01 LOGIN test {0}
S: + go ahead
C: <omitted>
S: L01 NO Login failed: authentication failure
Authentication failed. generic failure
Security strength factor: 0

These are my options to configure
./configure --with-sasl=/usr/local/lib --with-perl --with-auth=unix --with-dbdir=/usr/local/bdb --with-bdb-libdir=/usr/local/bdb/lib --with-bdb-incdir=/usr/local/bdb/include --with-openssl=/usr/local/ssl --without-ucdsnmp

Thanks

Luis

Simon Matter wrote:
Yes I have read the list archives, I found some tips about but I still
have the same message.

This is how I run saslauthd:
saslauthd -c -a pam&
    

Okay, your saslauthd uses PAM.

  
when I run testsaslauthd -u cyrus -p cyruspass
I received: 0: OK "Success"

sasldblistusers2:
    

sasldb2 doesn't come into the game here.

The question is how you have configured PAM? Check /var/log/messages to
see the error messages from PAM.

Simon

  
[EMAIL PROTECTED]: userPassword
[EMAIL PROTECTED]: cmusaslsecretOTP

My sasldb2 has the following permisssions:
-rw-r-----    1 cyrus    mail        12288 2004-02-18 17:59 sasldb2

These are the options I used to configure:

./configure --enable-anon --enable-plain --enable-login --disable-krb4
--disable-otp --disable-cram --disable-digest
--with-saslauthd=/var/run/saslauthd --with-pam=/lib/security
--with-dblib=berkeley --with-bdb-libdir=/usr/local/bdb/lib
--with-bdb-incdir=/usr/local/bdb/include --with-openssl=/usr/local/ssl
--with-plugindir=/usr/local/lib/sasl2

Thanks for your help.

Luis.

Simon Matter wrote:

    
Hi!!

I intalled cyrus-imapd following the Luc's Howto, but I'm at the final
part of the doc where it says:

To use the cyradm CLI please take care that the tool does recognize
standard CLI- options like -u and similar. Please follow the syntax like
descried in the man page cyradm1 , like the followinf example:

#cyadm --user cyrus --server localhost --auth plain
Password:SASL2 password
IMAP password: here I give a password that I have just introduced

Then I received the following message:

Login failed: authentication failure at
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Cyrus/IMAP/Admin.pm
line 118
cyradm: cannot authenticate to server with plain as cyrus


        
Is saslauthd running? Is saslauthd configured properly?
Maybe you can find your answer in the list archives, this has been
discussed before.

Simon



      
This is my imapd.conf
postmaster: postmaster
configdirectory: /var/imap
partition-default: /var/spool/imap
admins: cyrus
allowanonymouslogin: no
allowplaintext: yes
sasl_mech_list: PLAIN
servername: linux.local
autocreatequota: 10000
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: saslauthd
sievedir: /usr/sieve
sendmail: /usr/sbin/sendmail
sieve_maxscriptsize: 32
sieve_maxscripts: 5
#unixhierarchysep: yes



        
---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html



      
    


---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

  

Reply via email to