
4th April 2012, 00:37
|
|
Member
|
|
Join Date: Mar 2012
Posts: 41
Thanks: 20
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by falko
Looks to me as if the -r switch is missing. What do you have in /etc/default/saslauthd?
|
Here is the contents of that file.
Code:
#
# Settings for saslauthd daemon
# Please read /usr/share/doc/sasl2-bin/README.Debian for details.
#
# Should saslauthd run automatically on startup? (default: no)
START=yes
# Description of this saslauthd instance. Recommended.
# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"
# Short name of this saslauthd instance. Strongly recommended.
# (suggestion: saslauthd)
NAME="saslauthd"
# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam -- use PAM
# rimap -- use a remote IMAP server
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"
# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""
# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5
# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
#
# WARNING: DO NOT SPECIFY THE -d OPTION.
# The -d option will cause saslauthd to run in the foreground instead of as
# a daemon. This will PREVENT YOUR SYSTEM FROM BOOTING PROPERLY. If you wish
# to run saslauthd in debug mode, please run it by hand to be safe.
#
# See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
# See the saslauthd man page and the output of 'saslauthd -h' for general
# information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
OPTIONS="-c -m /var/run/saslauthd"
I don't know if this is related but every time I try apt-get upgrade I get the following error, is it related?
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
libsasl2-2 libsasl2-dev libsasl2-modules libsasl2-modules-sql
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/454 kB of archives.
After this operation, 180 kB disk space will be freed.
Do you want to continue [Y/n]? y
Reading changelogs... Done
Get:1 Changelog for libsasl2-2 (http://changelogs.ubuntu.com/changelogs/pool/main/c/cyrus-sasl2/cyrus-sasl2_2.1.24~rc1.dfsg1+cvs2011-05-23-4ubuntu2/changelog) [50.6 kB]
cyrus-sasl2 (2.1.24~rc1.dfsg1+cvs2011-05-23-4ubuntu2) oneiric; urgency=low
* Build for multiarch. LP: #826601.
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 15 Aug 2011 15:30:56 -0700
cyrus-sasl2 (2.1.24~rc1.dfsg1+cvs2011-05-23-4ubuntu1) oneiric; urgency=low
* Fix FTBFS with newer versions of Heimdal. LP: #825872
-- Jelmer Vernooij <jelmer@debian.org> Sat, 13 Aug 2011 18:00:52 +0200
cyrus-sasl2 (2.1.24~rc1.dfsg1+cvs2011-05-23-4) unstable; urgency=low
* Fix yet another upstream segfault breakage in GSSAPI from CVS
(Closes: #629589)
-- OndÅej Surý <ondrej@debian.org> Wed, 08 Jun 2011 08:37:13 +0200
cyrus-sasl2 (2.1.24~rc1.dfsg1+cvs2011-05-23-3) unstable; urgency=low
:
Last edited by Mitzy; 4th April 2012 at 00:40.
|

4th April 2012, 00:51
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Quote:
Originally Posted by Mitzy
Here is the contents of that file.
Code:
#
# Settings for saslauthd daemon
# Please read /usr/share/doc/sasl2-bin/README.Debian for details.
#
# Should saslauthd run automatically on startup? (default: no)
START=yes
# Description of this saslauthd instance. Recommended.
# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"
# Short name of this saslauthd instance. Strongly recommended.
# (suggestion: saslauthd)
NAME="saslauthd"
# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam -- use PAM
# rimap -- use a remote IMAP server
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"
# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""
# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5
# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
#
# WARNING: DO NOT SPECIFY THE -d OPTION.
# The -d option will cause saslauthd to run in the foreground instead of as
# a daemon. This will PREVENT YOUR SYSTEM FROM BOOTING PROPERLY. If you wish
# to run saslauthd in debug mode, please run it by hand to be safe.
#
# See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
# See the saslauthd man page and the output of 'saslauthd -h' for general
# information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
OPTIONS="-c -m /var/run/saslauthd"
|
The last line should look as follows:
Code:
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
Restart saslauthd afterwards.
Quote:
I don't know if this is related but every time I try apt-get upgrade I get the following error, is it related?
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
libsasl2-2 libsasl2-dev libsasl2-modules libsasl2-modules-sql
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/454 kB of archives.
After this operation, 180 kB disk space will be freed.
Do you want to continue [Y/n]? y
Reading changelogs... Done
Get:1 Changelog for libsasl2-2 (http://changelogs.ubuntu.com/changelogs/pool/main/c/cyrus-sasl2/cyrus-sasl2_2.1.24~rc1.dfsg1+cvs2011-05-23-4ubuntu2/changelog) [50.6 kB]
cyrus-sasl2 (2.1.24~rc1.dfsg1+cvs2011-05-23-4ubuntu2) oneiric; urgency=low
* Build for multiarch. LP: #826601.
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 15 Aug 2011 15:30:56 -0700
cyrus-sasl2 (2.1.24~rc1.dfsg1+cvs2011-05-23-4ubuntu1) oneiric; urgency=low
* Fix FTBFS with newer versions of Heimdal. LP: #825872
-- Jelmer Vernooij <jelmer@debian.org> Sat, 13 Aug 2011 18:00:52 +0200
cyrus-sasl2 (2.1.24~rc1.dfsg1+cvs2011-05-23-4) unstable; urgency=low
* Fix yet another upstream segfault breakage in GSSAPI from CVS
(Closes: #629589)
-- OndÅej Surý <ondrej@debian.org> Wed, 08 Jun 2011 08:37:13 +0200
cyrus-sasl2 (2.1.24~rc1.dfsg1+cvs2011-05-23-3) unstable; urgency=low
:
|
Please use apt-pinning ( http://www.howtoforge.com/a-short-in...to-apt-pinning ) to exclude the saslauthd packages from updates.
|
|
The Following User Says Thank You to falko For This Useful Post:
|
Mitzy (4th April 2012)
|

4th April 2012, 01:10
|
|
Member
|
|
Join Date: Mar 2012
Posts: 41
Thanks: 20
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by falko
The last line should look as follows:
Code:
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
Restart saslauthd afterwards.
|
When I make the change and run
Code:
service saslauthd restart
- nothing happens
Using
Code:
/etc/init.d/saslauthd start
I get the following
Code:
root@kicks:~# /etc/init.d/saslauthd start
You have new mail in /var/mail/root
root@kicks:~#
Still getting the same error in the mail log.
Last edited by Mitzy; 4th April 2012 at 01:18.
|

4th April 2012, 14:57
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Can you post your /etc/init.d/saslauthd? Looks like one of the exit conditions is met before saslauthd is actually started.
|
|
The Following User Says Thank You to falko For This Useful Post:
|
Mitzy (4th April 2012)
|

4th April 2012, 19:53
|
|
Member
|
|
Join Date: Mar 2012
Posts: 41
Thanks: 20
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by falko
Can you post your /etc/init.d/saslauthd? Looks like one of the exit conditions is met before saslauthd is actually started.
|
Sure thing falko
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides: saslauthd
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: saslauthd startup script
# Description: This script starts the saslauthd daemon. It is
# configured using the file /etc/default/saslauthd.
### END INIT INFO
# Author: Fabian Fagerholm <fabbe@debian.org>
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
# Global variables
DAEMON=/usr/sbin/saslauthd
DEFAULT_FILES=`find /etc/default -regex '/etc/default/saslauthd[_a-zA-Z0-9\-]*$' -print | sort`
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
# Function that starts all saslauthd instances
# Parameters: none
# Return value: none
do_startall()
{
for instance in $DEFAULT_FILES
do
start_instance $instance
done
}
# Function that stops all saslauthd instances
# Parameters: none
# Return value: none
do_stopall()
{
for instance in $DEFAULT_FILES
do
stop_instance $instance
done
}
# Function that sends a SIGHUP to all saslauthd instances
# Parameters: none
# Return value: none
do_reloadall()
{
for instance in $DEFAULT_FILES
do
reload_instance $instance
done
}
# Function that starts a single saslauthd instance
# Parameters:
# $1 = path of default file for this instance
# Return value:
# 0 on success (does not mean the instance started)
# 1 on failure
start_instance()
{
# Load defaults file for this instance.
. $1
# If the daemon is not enabled, give the user a warning and stop.
if [ "$START" != "yes" ]; then
log_warning_msg "To enable $NAME, edit $1 and set START=yes"
return 0
fi
# If the short name of this instance is undefined, warn the user
# but choose a default name.
if [ -z "$NAME" ]; then
log_warning_msg "Short name (NAME) undefined in $1, using default"
NAME=default
fi
log_daemon_msg "Starting $DESC" "$NAME"
# Determine run directory and pid file location by looking
# for an -m option.
RUN_DIR=`echo "$OPTIONS" | xargs -n 1 echo | sed -n '/^-m$/{n;p}'`
if [ -z "$RUN_DIR" ]; then
# No run directory defined in defaults file, fail.
log_failure_msg "No run directory defined for $NAME, not starting"
return 1
fi
PIDFILE=$RUN_DIR/saslauthd.pid
# If no mechanisms are defined, fail.
if [ -z "$MECHANISMS" ]; then
log_failure_msg "No mechanisms defined in $1, not starting $NAME"
return 1
fi
# If there are mechanism options defined, prepare them for use with
# the -O flag.
if [ -n "$MECH_OPTIONS" ]; then
MECH_OPTIONS="-O $MECH_OPTIONS"
fi
# If there is a threads option defined, prepare it for use with
# the -n flag.
if [ -n "$THREADS" ]; then
THREAD_OPTIONS="-n $THREADS"
fi
# Construct argument string.
DAEMON_ARGS="-a $MECHANISMS $MECH_OPTIONS $OPTIONS $THREAD_OPTIONS"
# If there is a statoverride for the run directory, then pull
# permission and ownership information from it and create the directory.
# Otherwise, we create the directory with default permissions and
# ownership (root:sasl, 710).
if dpkg-statoverride --list $RUN_DIR > /dev/null; then
createdir `dpkg-statoverride --list $RUN_DIR`
else
createdir root sasl 710 $RUN_DIR
fi
# Start the daemon, phase 1: see if it is already running.
start-stop-daemon --start --quiet --pidfile $PIDFILE --name $NAME \
--exec $DAEMON --test > /dev/null
if [ "$?" != "0" ]; then
log_progress_msg "(already running)"
log_end_msg 0
return 0
fi
# Start the daemon, phase 2: it was not running, so actually start it now.
start-stop-daemon --start --quiet --pidfile $PIDFILE --name $NAME \
--exec $DAEMON -- $DAEMON_ARGS
if [ "$?" -ne "0" ]; then
log_end_msg 1
return 1
fi
# Started successfully.
log_end_msg 0
return 0
}
# Function that stops a single saslauthd instance
# Parameters:
# $1 = path of default file for this instance
# Return value:
# 0 on success (daemon was stopped)
# 1 if the daemon was already stopped
# 2 if the daemon could not be stopped
stop_instance()
{
# Load defaults file for this instance.
. $1
# If the short name of this instance is undefined, warn the user
# but choose a default name.
if [ -z "$NAME" ]; then
log_warning_msg "Short name (NAME) undefined in $1, using default"
NAME=default
fi
# Determine run directory and pid file location by looking
# for an -m option.
RUN_DIR=`echo "$OPTIONS" | xargs -n 1 echo | sed -n '/^-m$/{n;p}'`
if [ -z "$RUN_DIR" ]; then
# No run directory defined in defaults file, fail.
log_failure_msg "No run directory defined for $NAME, cannot stop"
return 2
fi
PIDFILE=$RUN_DIR/saslauthd.pid
log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
--pidfile $PIDFILE --exec $DAEMON
if [ "$?" -eq "2" ]; then
# Failed to stop.
log_end_msg 1
return 2
fi
if [ "$?" -eq "1" ]; then
# Already stopped.
log_progress_msg "(not running)"
fi
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
# Stopped successfully.
log_end_msg 0
return $RETVAL
}
# Function that sends a SIGHUP to a single saslauthd instance
# Parameters:
# $1 = path of default file for this instance
# Return value:
# 0 on success (does not mean the daemon was reloaded)
# other values on failure
reload_instance()
{
# Load defaults file for this instance.
. $1
# If the short name of this instance is undefined, warn the user
# but choose a default name.
if [ -z "$NAME" ]; then
log_warning_msg "Short name (NAME) undefined in $1, using default"
NAME=default
fi
# Determine run directory and pid file location by looking
# for an -m option.
RUN_DIR=`echo "$OPTIONS" | xargs -n 1 echo | sed -n '/^-m$/{n;p}'`
if [ -z "$RUN_DIR" ]; then
# No run directory defined in defaults file, fail.
log_failure_msg "No run directory defined for $NAME, cannot reload"
return 2
fi
PIDFILE=$RUN_DIR/saslauthd.pid
log_daemon_msg "Reloading $DESC" "$NAME"
# Reload the daemon. First, see if it is already running.
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON --test > /dev/null
if [ "$?" -eq "0" ]; then
# Not running, signal this and stop.
log_progress_msg "(not running)"
log_end_msg 0
return 0
fi
start-stop-daemon --stop --signal 1 \
--pidfile $PIDFILE --exec $DAEMON
log_end_msg $?
}
# Function that creates a directory with the specified
# ownership and permissions
# Parameters:
# $1 = user
# $2 = group
# $3 = permissions (octal)
# $4 = path to directory
# Return value: none
createdir()
{
# In the future, use -P/-Z to have SE Linux enhancement
install -d --group="$2" --mode="$3" --owner="$1" "$4"
}
# Action switch
case "$1" in
start)
do_startall
;;
stop)
do_stopall
;;
reload|force-reload)
do_reloadall
;;
restart)
do_stopall
do_startall
;;
start-instance)
if [ -f /etc/default/$2 ]; then
start_instance /etc/default/$2
else
log_failure_msg "Instance $2 does not exist."
fi
;;
stop-instance)
if [ -f /etc/default/$2 ]; then
stop_instance /etc/default/$2
else
log_failure_msg "Instance $2 does not exist."
fi
;;
reload-instance|force-reload-instance)
if [ -f /etc/default/$2 ]; then
reload_instance /etc/default/$2
else
log_failure_msg "Instance $2 does not exist."
fi
;;
restart-instance)
if [ -f /etc/default/$2 ]; then
stop_instance /etc/default/$2
start_instance /etc/default/$2
else
log_failure_msg "Instance $2 does not exist."
fi
;;
*)
SCRIPTNAME=$0
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo " or {start-instance|stop-instance|restart-instance|" >&2
echo " reload-instance|force-reload-instance} " \
"<instance name>" >&2
exit 3
;;
esac
:
|

5th April 2012, 13:33
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Do /var/spool/postfix/var/run/saslauthd and /usr/sbin/saslauthd exist?
Does
Code:
start-stop-daemon --start --quiet --pidfile /var/spool/postfix/var/run/saslauthd/saslauthd.pid --name saslauthd --exec /usr/sbin/saslauthd -- -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
show any errors?
|
|
The Following User Says Thank You to falko For This Useful Post:
|
Mitzy (5th April 2012)
|

5th April 2012, 19:43
|
|
Member
|
|
Join Date: Mar 2012
Posts: 41
Thanks: 20
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by falko
Do /var/spool/postfix/var/run/saslauthd and /usr/sbin/saslauthd exist?
|
/var/spool/postfix/var/run/saslauthd exists but nothing within the directory
/usr/sbin/saslauthd doesn't exist.
Quote:
Does
Code:
start-stop-daemon --start --quiet --pidfile /var/spool/postfix/var/run/saslauthd/saslauthd.pid --name saslauthd --exec /usr/sbin/saslauthd -- -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
show any errors?
|
Yes.
Code:
root@kicks:~# start-stop-daemon --start --quiet --pidfile /var/spool/postfix/var/run/saslauthd/saslauthd.pid --name saslauthd --exec /usr/sbin/saslauthd -- -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
start-stop-daemon: unable to stat /usr/sbin/saslauthd (No such file or directory)
root@kicks:~#
|

6th April 2012, 12:05
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Quote:
Originally Posted by Mitzy
/usr/sbin/saslauthd doesn't exist.
|
That's the problem. I think you should reinstall saslauthd.
|
|
The Following User Says Thank You to falko For This Useful Post:
|
Mitzy (7th April 2012)
|

6th April 2012, 13:19
|
|
Member
|
|
Join Date: Mar 2012
Posts: 41
Thanks: 20
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by falko
That's the problem. I think you should reinstall saslauthd.
|
Hey Falko pulling my hair out now, I get the following error when I try to remove or install saslauthd
I get the following error.
Code:
root@kicks:~# apt-get remove saslauthd
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package saslauthd
root@kicks:~#
|

7th April 2012, 01:20
|
|
Member
|
|
Join Date: Mar 2012
Posts: 41
Thanks: 20
Thanked 0 Times in 0 Posts
|
|
Update.
After the errors above I decided to throw in the towel and rebuild from scratch. So clean install, followed the LEMP guide to the letter and then once I was up and running followed the instructions in this comment.
http://www.howtoforge.com/ubuntu-11....#comment-31087
Quote:
|
Originally Posted by evildave
https://bugs.launchpad.net/ubuntu/+source/cyrus-sasl2/+bug/875440/comments/34
states that only some arguments in the config-file changed. Worked for me!
|
For what it's worth I believe these instructions should be added to the LEMP guide as everyone will run into the same issue.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 11:33.
|
|
Recent comments
2 hours 21 min ago
11 hours 49 min ago
12 hours 38 min ago
16 hours 11 min ago
20 hours 35 min ago
20 hours 57 min ago
23 hours 7 min ago
1 day 9 hours ago
1 day 14 hours ago
1 day 15 hours ago