Cyrus Imapd v1 + PAM + Kerberos V mini-HowTo


Cyrus Imapd v1 + PAM + Kerberos V mini-HowTo

Sebastian Utz seut@netfrag.org

last changes

    Revision 1.1  2003/01/25 08:44:50  jonen
    + create new

Description

Install and configure Cyrus Imapd v1 with PAM and Kerberos V support (debian way...)

install cyrus imapd

Be sure, your deb sources contains kerberosized cyrus packages!

  Turbo Fredriksson has good ones:
    deb ftp://ftp.bayour.com/pub/debian local .
    deb-src ftp://ftp.bayour.com/pub/debian local .
  apt-get install cyrus-common cyrus-imapd cyrus-admin

create imapd wrapper (needed for kerberos V)

  mv /usr/sbin/imapd /usr/sbin/imapd.real

  nano /usr/sbin/imapd:
       #!/bin/sh
      KRB5_KTNAME=/etc/krb5.keytab.cyrus
      export KRB5_KTNAME
      exec /usr/sbin/imapd.real $@

  chmod a+x /usr/sbin/imapd

link pwcheck to pwcheck_pam

  rm /etc/alternatives/pwcheck

  ln -s /usr/sbin/pwcheck_pam /etc/alternatives/pwcheck

configure /etc/pam.d/cyrus

  nano /etc/pam.d/cyrus
     auth    required        pam_krb5.so
     account required        pam_ldap.so

create kerberos imap service key

  kadmin.local -q "addprinc -randkey imap/<FQDN>@<YOUR KERBEROS REALM>"
  kadmin.local -q "addprinc -randkey pop/<FQDN>@<YOUR KERBEROS REALM>" 
  kadmin.local -q "ktadd -k /etc/krb5.keytab.cyrus imap/<FQDN>"
  kadmin.local -q "ktadd -k /etc/krb5.keytab.cyrus pop/<FQDN>"
  chown cyrus /etc/krb5.keytab.cyrus

Requirements

  - Cyrus Imapd v1
  - libpam-krb5
  - Kerberos V

Resources

Cyrus IMAP Server
  - http://asg.web.cmu.edu/cyrus/imapd/
OpenLDAP, OpenSSL, SASL and KerberosV HOWTO
  - http://www.bayour.com/LDAPv3-HOWTO.html

ToDo

  o MORE docu !!
  o is pam really needed if imaps is use with above wrapper?
  o write more about Kerberos V
  o docu installation for other distribution than Debian
  o check out Cyrus Imapd v2 and SASL v2 more and write howto
  x write more about Cyrus SASL

back to top

 Cyrus Imapd v1 + PAM + Kerberos V mini-HowTo