# saslauthd  start -> gives usage ... (SOLVED)

## jeanluca

Hi All

I'm trying to setup a mail server according http://www.gentoo.org/doc/en/virt-mail-howto.xml

At the point I've mysql running and try to restart saslauthd I get

```

~ # /etc/init.d/saslauthd  start

 * Starting saslauthd ...

usage: saslauthd [options]

option information:

  -a <authmech>  Selects the authentication mechanism to use.

  -c             Enable credential caching.

  -d             Debugging (don't detach from tty, implies -V)

  -r             Combine the realm with the login before passing to authentication mechanism

                 Ex. login: "foo" realm: "bar" will get passed as login: "foo@bar"

                 The realm name is passed untouched.

  -O <option>    Optional argument to pass to the authentication

                 mechanism.

  -l             Disable accept() locking. Increases performance, but

                 may not be compatible with some operating systems.

  -m <path>      Alternate path for the saslauthd working directory,

                 must be absolute.

  -n <procs>     Number of worker processes to create.

  -s <kilobytes> Size of the credential cache (in kilobytes)

  -t <seconds>   Timeout for items in the credential cache (in seconds)

  -v             Display version information and available mechs

  -V             Enable verbose logging

  -h             Display this message.

saslauthd 2.1.23

authentication mechanisms: sasldb getpwent pam rimap shadow ldap        [!!]

tux ~ # 
```

Searching the forum I see (more or less) identical post from 2004 which do not really help anymore  :Sad:  (my gentoo install is recent)

Any suggestions ? 

thnx LuCaLast edited by jeanluca on Wed Aug 12, 2009 3:15 am; edited 1 time in total

----------

## Mike Hunt

please post the output of this

```
grep '^[^#]' /etc/conf.d/saslauthd; cat /etc/init.d/saslauthd
```

----------

## cach0rr0

it's your /etc/conf.d/saslauthd

from the init script

```

start() {

        ebegin "Starting saslauthd"

        start-stop-daemon --start --quiet --exec /usr/sbin/saslauthd \

                -- ${SASLAUTHD_OPTS}

        eend $?

}

```

SASLAUTHD_OPTS is taken from /etc/conf.d/saslauthd

if you run saslauthd without any arguments, or incorrect arguments, it gripes (rightfully so)

having /etc/conf.d/saslauthd incorrect, or with nothing configured, would result in seeing command opts upon startup

----------

## jeanluca

here it is

```
$ grep '^[^#]' /etc/conf.d/saslauthd; cat /etc/init.d/saslauthd

SASLAUTHD_OPTS="${SASLAUTH_MECH} -a rimap -r"

SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -O localhost"

SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -a pam"

#!/sbin/runscript

# Copyright 1999-2007 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/saslauthd2.rc6,v 1.7 2007/04/07 13:03:55 chtekk Exp $

depend() {

   need net

}

start() {

   ebegin "Starting saslauthd"

   start-stop-daemon --start --quiet --exec /usr/sbin/saslauthd \

      -- ${SASLAUTHD_OPTS}

   eend $?

}

stop() {

   ebegin "Stopping saslauthd"

   start-stop-daemon --stop --quiet --pidfile /var/lib/sasl2/saslauthd.pid

   eend $?

}

```

----------

## cach0rr0

see if you don't get any joy commenting out the PAM line in /etc/conf.d/saslauthd

----------

## jeanluca

yes if I comment out the line

```
SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -a pam"
```

 it starts

but isn't pam required for authentication ? On the otherhand, authentication is done with mysql, so it might be no problem!

----------

## cach0rr0

 *jeanluca wrote:*   

> yes if I comment out the line
> 
> ```
> SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -a pam"
> ```
> ...

 

You're authing against mysql, so no - not unless you need people to auth against shadow

if you wish to use both, I *think* the right way would be:

SASLAUTHD_OPTS="${SASLAUTH_MECH} -a rimap pam -r"

test it though, not 100% on that.

----------

## jeanluca

that works too!

thnx a lot!

----------

