Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: sasl autentication
PostPosted: Sun Aug 10, 2003 12:15 pm 
Offline
Newbie

Joined: Sun Aug 10, 2003 11:04 am
Posts: 4
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


Top
   
 Post subject:
PostPosted: Sun Aug 10, 2003 1:42 pm 
Offline
Senior Newbie

Joined: Sun Aug 10, 2003 1:23 pm
Posts: 5
Website: http://www.distortedcerebration.net
Location: Here
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.

_________________
.....


Top
   
 Post subject:
PostPosted: Fri Aug 22, 2003 3:40 am 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
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


Top
   
 Post subject:
PostPosted: Sat Nov 15, 2003 6:24 am 
Offline
Newbie

Joined: Sat Nov 15, 2003 5:56 am
Posts: 2
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


Top
   
 Post subject:
PostPosted: Sat Nov 15, 2003 10:25 am 
Offline
Junior Member

Joined: Sun Jul 27, 2003 7:24 pm
Posts: 42
Website: http://opencurve.org/~sunny
Location: New York, NY
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).


Top
   
 Post subject:
PostPosted: Sat Nov 15, 2003 2:36 pm 
Offline
Junior Member

Joined: Thu Sep 18, 2003 1:44 pm
Posts: 46
Website: http://www.officemechanic.com
AOL: schof@mac.com
Location: Los Angeles
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?

_________________
John Schofield
Apple Certified Technical Coordinator
Office Mechanic Consulting
Mac, Unix, and PC Computer Support
www.officemechanic.com


Top
   
 Post subject:
PostPosted: Sat Nov 15, 2003 3:07 pm 
Offline
Junior Member

Joined: Sun Jul 27, 2003 7:24 pm
Posts: 42
Website: http://opencurve.org/~sunny
Location: New York, NY
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


Top
   
 Post subject: Postfix on Debian Woody
PostPosted: Tue Nov 18, 2003 2:26 am 
Offline
Junior Member

Joined: Tue Nov 18, 2003 2:02 am
Posts: 30
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group