• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Authentifizierung beim cyradm funktioniert nicht.

Status
Für weitere Antworten geschlossen.

$noop

Newbie
Also ich häng schon seit mind. 3 Wochen an diesem Mailserver prob rum und kommt
nicht weiter. Ich kann mich unter meinem Win2K OE nicht einloggen da kommt immer
das entweder der Benutzername oder das Kennwort falsch ist.(außer beim user cyrus
wenn ich per imap drauf zugreif aber dann hab ich alle Postfächer zu Auswahl)ich vermute
es liegt an der Authentifizierung aber ich komm da nicht weiter

(main.cf)
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,check_relay_domains
smtpd_sender_restrictions = hash:/etc/postfix/access

(imapd.conf)
admins: cyrus root
allowanonymouslogin: no
allowplainwithouttls: yes
autocreatequota: 10000
configdirectory: /var/lib/imap
drachost: localhost
dracinterval: 0
duplicatesuppression: yes
lmtp_overquota_perm_failure: no
lmtpsocket: /var/spool/postfix/public/lmtp
normalizeuid: yes
partition-default: /var/spool/imap
poptimeout: 10
quotawarn: 90
reject8bit: no
sasl_pwcheck_method: saslauthd auxprob
sasl_auxprob_plugin: sasldb
sasl_mech_list: LOGIN plain login PLAIN
sievedir: /var/lib/sieve
timeout: 30
unixhierarchysep: no
altnamespace: no
lmtp_luser_relay: mailadmin



wenn ich:

" cyradm -u cyrus -a login localhost" eingebe kommt:

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

(/var/log/mail)

Sep 24 07:43:38 kae-soxs postfix/smtp[26496]: fatal: open database /etc/postfix/smtp_auth.db: No such file or directory
Sep 24 07:43:39 kae-soxs postfix/master[15152]: warning: process /usr/lib/postfix/smtp pid 26496 exit status 1
Sep 24 07:43:39 kae-soxs postfix/master[15152]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling



(/var/log/messages)
Sep 24 07:27:54 kae-soxs master[26305]: about to exec /usr/lib/cyrus/bin/imapd
Sep 24 07:27:54 kae-soxs imap[26305]: executed
Sep 24 07:27:54 kae-soxs imapd[26305]: accepted connection
Sep 24 07:27:54 kae-soxs PAM-warn[763]: function=[pam_sm_authenticate] service=[imap] terminal=[<unknown>] user=[root] ruser=[<unknown>] rhost=[<unknown>]
Sep 24 07:27:54 kae-soxs saslauthd[763]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Sep 24 07:27:54 kae-soxs saslauthd[763]: AUTHFAIL: user=root service=imap realm= [PAM auth error]
Sep 24 07:27:54 kae-soxs imapd[26305]: badlogin: localhost[127.0.0.1] plaintext root SASL(-13): authentication failure: checkpass failed


warum soll ich mein auth_pam "debuggen" und wenn wie soll das gehen ?
Liegt es daran wie ich die benutzer angelegt habe ?Wo lagt man fest was der Benutzer
für ein Kennwort hat und wo wird es gespeichert(Datei o. Datenbank)?
Ich habe meine ganzen Benutzer mit dem Webadmin Tool eingerichtet das
beim Suse Open Exchange Server mit dabei war es stand nämlich das man es nicht mit
yast machen sollte da man da nicht so viel Möglichkeiten hat.

Es wäre nett wenn ihr mir vieleicht ein wenig bei meinem problem helfen könntet bzw.
auf einen anderen Topic mit Lösung verweisen könntet.
 

oc2pus

Ultimate Guru
also hier kommen mehrere Probleme zusammen ;)

Sep 24 07:43:38 kae-soxs postfix/smtp[26496]: fatal: open database /etc/postfix/smtp_auth.db: No such file or directory

smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
==> diese datei musst du mit postmap in deine smtp_auth.db umwandeln

dieser Fehler ist damit behoben ;)

in deiner imapd.conf diese beiden Einträge rein ...
sasl_pwcheck_method: auxprop
sasl_mesh_list: plain login PLAIN LOGIN
die anderen mit sasl_* raus. Damit verschwindet

Sep 24 07:27:54 kae-soxs PAM-warn[763]: function=[pam_sm_authenticate] service=[imap] terminal=[<unknown>] user=[root] ruser=[<unknown>] rhost=[<unknown>]
Sep 24 07:27:54 kae-soxs saslauthd[763]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure

prüfe ob der rcsaslauthd läuft ... rcsaslauthd status ?

nach diesen Änderungen kommen evtl andere Fehlermeldungen... dann sehen wir weiter ;)
 
OP
$noop

$noop

Newbie
(/var/log/messages)
bei:" cyradm -u cyrus -a login localhost"
Sep 24 08:45:50 kae-soxs master[28542]: about to exec /usr/lib/cyrus/bin/imapd
Sep 24 08:45:50 kae-soxs imap[28542]: executed
Sep 24 08:45:50 kae-soxs imapd[28542]: accepted connection
Sep 24 08:45:50 kae-soxs imapd[28542]: unknown password verifier
Sep 24 08:45:50 kae-soxs imapd[28542]: badlogin: localhost[127.0.0.1] plaintext root SASL(-4): no mechanism available: checkpass failed

(/var/log/mail)
Sep 24 08:46:29 kae-soxs postfix/nqmgr[28490]: 2698D2E64B: to=<swiegmann@domain.de>, relay=none, delay=0, status=deferred (deferred transport)
Sep 24 08:46:29 kae-soxs postfix/nqmgr[28490]: 2905F2E687: from=<>, size=2180, n rcpt=1 (queue active)
Sep 24 08:46:29 kae-soxs postfix/nqmgr[28490]: 2905F2E687: to=<root@domain.d e>, relay=none, delay=0, status=deferred (deferred transport)
Sep 24 08:46:29 kae-soxs postfix/nqmgr[28490]: 2D5222E689: from=<>, size=2036, n rcpt=1 (queue active)
Sep 24 08:46:29 kae-soxs postfix/nqmgr[28490]: 2D5222E689: to=<swiegmann@domain.de>, relay=none, delay=0, status=deferred (deferred transport)



Der rcsaslauthd läuft (running)
 

oc2pus

Ultimate Guru
yradm -u cyrus -a login localhost

ist cyrus neugestartet worden nach der Änderung an imapd.conf?
hast du mit saslpasswd2 -c cyrus ein Passwort für cyrus angelegt ?
welche Rechte hat die Datei /etc/sasldb2 (sollte cyrus.mail gehören) ?

EDIT: saslpasswd2 (Tippfehler, sorry)
 
OP
$noop

$noop

Newbie
Nach: cyradm -u cyrus -a login localhost

Login failed: no mechanism available at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Cyrus/IMAP/Admin.pm line 114
cyradm: cannot authenticate to server with login as root

/var/log/messages

Sep 24 10:53:00 kae-soxs master[2017]: about to exec /usr/lib/cyrus/bin/imapd
Sep 24 10:53:00 kae-soxs imap[2017]: executed
Sep 24 10:53:00 kae-soxs imapd[2017]: accepted connection
Sep 24 10:53:00 kae-soxs imapd[2017]: unknown password verifier
Sep 24 10:53:00 kae-soxs imapd[2017]: badlogin: localhost[127.0.0.1] plaintext root SASL(-4): no mechanism available: checkpass failed
Sep 24 10:54:03 kae-soxs master[726]: process 2017 exited, status 0

Rechte der Datei

-rw-r--r-- 1 root root 12288 Sep 24 10:33 sasldb
-rw-r----- 1 cyrus.mail mail 12288 Sep 23 14:10 sasldb2

aber warum legt man mit "saslpasswd -c cyrus" die den user an und nicht mit "saslpasswd2 -c cyrus" ?
 

oc2pus

Ultimate Guru
ok, du hast also jetzt den cyrus in der sasldb2 drin ?
sasldblistusers2 <== damit prüfen

in deiner imapd.conf steht drin:
sasl_pwcheck_method: auxprop
sasl_mech_list: LOGIN plain login PLAIN
und sonst KEINE sasl_* Option ?
 
OP
$noop

$noop

Newbie
Das mit "auxprob"->auxprop war wirklich falsch (dumme Leichtsinns Fehler)
:x

kae-soxs:~ # sasldblistusers2
swiegmann@kae-soxs: userPassword
cyrus@kae-soxs: userPassword
root@kae-soxs: userPassword
kae-soxs:~ #

(imapd.conf)
sasl_pwcheck_method: auxprop
sasl_auxprob_plugin: sasldb
sasl_mech_list: plain login PLAIN LOGIN

cyradm -u cyrus -a login localhost
Login failed: authentication failure at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Cyrus/IMAP/Admin.pm line 114
cyradm: cannot authenticate to server with login as root


(var/log/messages)

Sep 24 11:41:25 kae-soxs master[2046]: about to exec /usr/lib/cyrus/bin/imapd
Sep 24 11:41:25 kae-soxs imap[2046]: executed
Sep 24 11:41:25 kae-soxs imapd[2046]: accepted connection
Sep 24 11:41:25 kae-soxs imapd[2046]: badlogin: localhost[127.0.0.1] plaintext root SASL(-13): authentication failure: checkpass failed
 
OP
$noop

$noop

Newbie
(/var/log/messages)
Sep 24 11:54:04 kae-soxs imapd[2223]: accepted connection
Sep 24 11:54:04 kae-soxs imapd[2223]: badlogin: localhost[127.0.0.1] plaintext root SASL(-1 3): authentication failure: checkpass failed

cyradm -u cyrus -a login localhost
Login failed: authentication failure at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Cyrus/IMAP/Admin.pm line 114
cyradm: cannot authenticate to server with login as root

hat sich leider nicht viel getan... :roll:
 

oc2pus

Ultimate Guru
gibt es bei dir überhaupt einen User cyrus ?
hat dieser ein Password ?

You also have to assign a password to system user cyrus:
Enter the command: passwd cyrus

With
cyradm --auth login localhost --user cyrus

you are then able to login and e.g. create mailboxes for your
users.
To create a user with e.g. YaST is NOT sufficient!!!
Example session to create a mailbox for user named 'choeger':

linux:~ # cyradm --auth login localhost -u cyrus
Please enter your password:
IMAP Password:
localhost> createmailbox user.choeger
localhost> listmailbox
user.choeger
localhost> listacl user.choeger
choeger lrswipcda
localhost> setacl user.choeger cyrus lrswipcda
localhost> listacl user.choeger
choeger lrswipcda
cyrus lrswipcda
localhost> exit

probiere Spasseshalber mal den cyradm Befehl mit dem user root
also cyradm -u root ....
 
OP
$noop

$noop

Newbie
cyradm -u root -a login localhost
Login failed: authentication failure at /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Cyrus/IMAP/Admin.pm line 114
cyradm: cannot authenticate to server with login as root

kae-soxs:/etc # cyradm --auth login localhost --user cyrus
IMAP Password:*****
localhost> createmailbox user.choeger
localhost> lm
user.choeger (\HasNoChildren)
localhost> listacl user.choeger
choeger lrswipcda
localhost> setacl user.choeger cyrus lrswipcda
localhost> listacl user.choeger
choeger lrswipcda
cyrus lrswipcda
localhost> exit

(/var/log/messages)
Sep 24 13:00:00 kae-soxs /USR/SBIN/CRON[2955]: (root) CMD (/opt/comfire/application/scripts/autoresponder)
Sep 24 13:00:00 kae-soxs imapd[2935]: login: localhost[127.0.0.1] cyrus plaintext


Wo muss denn der User cyrus überall existieren ?
 

oc2pus

Ultimate Guru
hast das, das du jetzt eine Anmeldung hinbekommen hast und das Beispiel so ausprobiert hast ? und es hat funktioniert ...
d.h mit dem Befehl cyradm --auth login localhost --user cyrus hat es funktioniert ?

der user cyrus benötigt einen System-Account (technischer user) UND als admin einen cyrus-account ;)
 
OP
$noop

$noop

Newbie
JA es ging und Emails kann ich auch schon abholen
unter meinem eigenen Account.. unter Win2K mit OE
ich finds einfach geil :D
 
Status
Für weitere Antworten geschlossen.
Oben