Linode Forum
https://forum.linode.com/

sasl autentication
https://forum.linode.com/viewtopic.php?f=11&t=241
Page 1 of 1

Author:  ppdorapa [ Sun Aug 10, 2003 12:15 pm ]
Post subject:  sasl autentication

i add the user with saslpasswd
i start saslauthd -a shadow
but when i try to send mail with autentication i get an error that the login and password doesnt match.
any ideas ?
thanks

Author:  funkknight [ Sun Aug 10, 2003 1:42 pm ]
Post subject: 

Check to make sure whatever userid, the daemons are running under has read access to the proper files. I believe the file is /etc/sasldb.

I just started playing with postfix + sasl yesterday and I ran into this problem a few times. But that's really all I know right now. I put that on hold for some other stuff.

Author:  irgeek [ Fri Aug 22, 2003 3:40 am ]
Post subject: 

Quote:
i start saslauthd -a shadow


You are telling saslauthd to look in your /etc/shadow file! You can add people with saslpasswd all day, but it won't get you anywhere. You need to add them to the passwd/shadow files on your box. Yes, that means they will have an account on the host, so if you don't want that, try this:

saslauthd -a sasldb

That will make saslauthd look in /etc/sasldb

-- James

Author:  Whiplash [ Sat Nov 15, 2003 6:24 am ]
Post subject: 

Depends on the MTA as well, for example, Postfix on Debian runs chrooted and has no access to /etc so you need to put it in /var/spool/postfix/etc or somewhere else that the user running the mta has access to

Author:  sunny [ Sat Nov 15, 2003 10:25 am ]
Post subject: 

Do you just want authentication against /etc/passwd ? if you do, you should use Cyrus-SASL2 with pam (it can be done!!)

The following shows how

Code:
To compile it and install it:
./configure --prefix=/usr/local --enable-login --disable-krb4 --disable-gssapi --disable-cram --disable-digest
make
make install
ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
ldconfig
mkdir -p /var/state/saslauthd
chmod 711 /var/state/saslauthd

To configure it:
echo "pwcheck_method: saslauthd" > /usr/local/lib/sasl2/smtpd.conf

To setup a correct PAM entry:
cp /etc/pam.d/other /etc/pam.d/smtp

To run it:
/usr/local/sbin/saslauthd -a pam -n 2
(replace n with however many instances you want)


HTH

Sunny Dubey

PS: When running MTA's like Postfix or whatever ... DO NOT PASS A "sasl local domain" OF ANY KIND. What ends up happening is that instead of authenticating "username", the MTA will pass along "username@domain", which obviously will fail. Check your logs to make sure this isn't happening (even with your *current* setup.) If this is, google for pam_realm (which strips the @domain part).

Author:  schof [ Sat Nov 15, 2003 2:36 pm ]
Post subject: 

Like ppdorapa, I'm struggling with SMTP authentication. I've googled many different documents (and understood some of them :wink: ) but am having trouble figuring out the big picture -- can someone give me an outline of the steps? The end result I'm looking for is secure POP, secure IMAP, and secure SMTP using Debian woody. I've played with exim and postfix, and am open to any solution that can be installed and updated with apt-get.

As I understand it, I need to enable some kind of wrapper (either sasl or sslwrap or something else) that will accept incoming SSL connection on behalf of the daemon listening at that port, and then pass the decrypted communication to the correct daemon.

With SMTP, should I then remove all relaying restrictions and allow access only through the SSL wrapper? (A related problem I'm trying to address is that the default configuration of exim blocks me from sending to anyone but myself.) How would I then configure my mail client? Obviously to use SSL in the connection, but what about authentication? Password or Kerberos 4 or 5 or MD5 Challenge-Response?

Does IMAP require this wrapper, or is encryption already supported by the IMAP protocol?

Author:  sunny [ Sat Nov 15, 2003 3:07 pm ]
Post subject: 

schof wrote:
As I understand it, I need to enable some kind of wrapper (either sasl or sslwrap or something else) that will accept incoming SSL connection on behalf of the daemon listening at that port, and then pass the decrypted communication to the correct daemon.


That is one way, but postfix can do this naturally via a TLS patch. Check out the docs on postfix.org and my own (WIP) howto at: http://opencurve.org/~sunny/nix/postfix/. Its far from being done, but it covers SASL, and TLS/SSL

As for IMAP-SSL? Courier-IMAP does that super easy. Their documentation is all one needs. However you may find yourself doing the following so that you don't use Courier-IMAP's broken PAM setup.

cp /etc/pam.d/other /etc/pam.d/pop3
cp /etc/pam.d/other /etc/pam.d/imap

schof wrote:
How would I then configure my mail client? Obviously to use SSL in the connection, but what about authentication? Password or Kerberos 4 or 5 or MD5 Challenge-Response?


Careful here, not all SASL authentication mechanisms work with all authentication sources. IIRC Pam only works with PLAIN and LOGIN. However saslauthdb works with CRAM-MD5, DIGEST-MD5. You gotta figure all of this out at compile time. (When you think about one way encryption hashes, you'll see why this is true.)

To make things more confusing PLAIN and LOGIN cannot be sent over a clear text network. However CRAM and DIGEST can.

Sunny Dubey

PS: Sorry for screwing up the posting

Author:  smerritt [ Tue Nov 18, 2003 2:26 am ]
Post subject:  Postfix on Debian Woody

I've successfully set up Postfix's SMTP AUTH to use PAM on Debian Woody. This document tells how to do it fairly painlessly. I strongly recommend getting TLS working after this, since otherwise you'll be sending passwords in the clear.

http://www.lugod.org/mailinglists/archives/vox-tech/2003-10/msg00207.html

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/