Check user existance with sasl+pam

Subject: Check user existance with sasl+pam
From: Friedlin (f dot barth at gmx dot net)
Date: Thu Apr 03 2003 - 03:13:44 EST

I need to check whether a user exists on my machine or not. My try was
to use the sasl_user_exists() call. But I can't choose which auth to
use, it always uses sasldb for which it works great. My problem is, that
I want to use PAM over SASL.

For sasldb I've written (basically) the following:

static struct sasl_callback cb[] = {
sasl_conn_t *conn;

if ( sasl_server_init(cb, "imap") == SASL_OK )
  // OK, SASL initialisation suceeded,
  // try to create a new server task
  if ( sasl_server_new("imap",
                        &conn) == SASL_OK )
    if (sasl_user_exists( conn,"imap", NULL, <username> == SASL_OK );
      // USER EXISTS...

Any ideas how to check the user existance with sasl over pam? Maybe I
need to use saslauthd? I haven't check that cause documentation seems to
be very small...

Hosted Email Solutions

Invaluement Anti-Spam DNSBLs

Powered By FreeBSD   Powered By FreeBSD