Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th January 2006, 14:25
daashag daashag is offline
Junior Member
 
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default saslauthd :NAME Command not found

Hi, I am following the perfect setup for Debian Sarge 3.1, I have run into a snag with saslauthd starting. I get the following error when I run the command /etc/init.d/saslauthd start

/etc/init.d/saslauthd: line 1: NAME: command not found

I saw a similar post from tecky. I checked what was suggested as a fix ie.. chmod +x. Also I am editing the files directly on my Debain install. I actully tried replacing the variable $NAME with saslauthd throughout the script. I still get the error with NAME variable completely removed from /etc/init.d/saslauthd script. I pretty much hit a brickwall on this one. Any help would be greatly appreciated.

Thanks in advance

dasshag
Reply With Quote
Sponsored Links
  #2  
Old 18th January 2006, 16:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,395
Thanks: 833
Thanked 5,490 Times in 4,322 Posts
Default

Please post the contents of the file /etc/init.d/saslauthd and the output of the command: ls -la /etc/init.d/saslauthd
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 18th January 2006, 20:30
daashag daashag is offline
Junior Member
 
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thankyou for your response till.

Here's the contents of my /etc/init.d/saslauthd file:

#!/bin/sh -e

NAME=saslauthd
DAEMON="/usr/sbin/${NAME}"
DESC="SASL Authentication Daemon"
DEFAULTS=/etc/default/saslauthd
PWDIR="/var/spool/postfix/var/run/$(NAME)"
PIDFILE="$(PWDIR)/saslauthd.pid"
dir="root sasl 755 $(PWDIR)"

createdir() {
# $1 = user
# $2 = group
# $3 = permissions (octal)
# $4 = path to directory
[ -d "$4" ] || mkdir -p "$4"
chown -c -h "$1:$2" "$4"
chmod -c "$3" "$4"
}

test -f "${DAEMON}" || exit 0

# Source defaults file; edit that file to configure this script.
if [ -e "${DEFAULTS}" ]; then
. "${DEFAULTS}"
fi

# If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then
exit 0
fi

# If we have no mechanisms defined
if [ "x${MECHANISMS}" = "x" ]; then
echo "You need to configure ${DEFAULTS} with mechanisms to be used"
exit 0
fi

# Add our mechanimsms with the necessary flag
PARAMS="${PARAMS} -a ${MECHANISMS}"

START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME} -- ${PARAMS}"

# Consider our options
case "${1}" in
start)
echo -n "Starting ${DESC}: "
#dir=`dpkg-statoverride --list $PWDIR`
test -z "$dir" || createdir $dir
if start-stop-daemon ${START} >/dev/null 2>&1 ; then
echo "${NAME}."
else
if start-stop-daemon --test ${START} >/dev/null 2>&1; then
echo "(failed)."
exit 1
else
echo "${DAEMON} already running."
exit 0
fi
fi
;;
stop)
echo -n "Stopping ${DESC}: "
if start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" \
--startas ${DAEMON} --retry 10 --name ${NAME} \
>/dev/null 2>&1 ; then
echo "${NAME}."
else
if start-stop-daemon --test ${START} >/dev/null 2>&1; then
echo "(not running)."
exit 0
else
echo "(failed)."
exit 1
fi
fi
;;
restart|force-reload)
$0 stop
exec $0 start
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0


Heres the result of ls -la
-rwxr-xr-x 1 root root 1959 2006-01-18 14:19 /etc/init.d/saslauthd

Thansk again
Reply With Quote
  #4  
Old 18th January 2006, 20:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Ok, and you're sure that the file has Unix linebreaks, not Windows linebreaks?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 18th January 2006, 21:11
daashag daashag is offline
Junior Member
 
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your response Falko

I am using nano for my editor. Just for a shot in the dark I tried editing it with vi.

I don't understand exactly what it is looking for. As I mentions in the original post, I substituted $(NAME) with "saslauthd". So the $(NAME) variable was completely removed from the script. And I still get the same error. Also line 1 of my /etc/init.d/saslauthd is the !bin/bash line. It acts like its not even running the script. I have also tried rebooting.

Thanks again
Reply With Quote
  #6  
Old 19th January 2006, 07:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Quote:
Originally Posted by daashag
Thanks for your response Falko

I am using nano for my editor. Just for a shot in the dark I tried editing it with vi.
But maybe you created the file on a Windows system and then transferred it to your Linux system where you now use nano and vi to edit it. Therefore there could still be Windows linebreaks in the file. If lines end with something like
^M then there are Windows linebreaks.

Quote:
Originally Posted by daashag
Also line 1 of my /etc/init.d/saslauthd is the !bin/bash line.
But in your previous post the first line was
Code:
#!/bin/sh -e
, not
Code:
#!/bin/bash
...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 19th January 2006, 13:21
daashag daashag is offline
Junior Member
 
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah your right, I just wrote that from memory, not the actual code. Although the actual /etc/init.d/saslauthd file has the correct code. I still don't understand the error. And why its calling line 1 of the /etc/init.d/saslauthd file. I think I want to start from scratch or at least the saslauthd part. I am a little concerned because this is a production box that I don't have physical access to, otherwise I would just reinstall and start over. I did a perfect setup on my laptop last night that has ubuntu and all went fine and the only differance in the installs was that I did a cut and paste instead of typing all the commands in. Any thoughts?

Thanks daashag
Reply With Quote
  #8  
Old 19th January 2006, 15:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

What if you simply re-create /etc/init.d/saslauthd with the code from http://www.howtoforge.com/perfect_setup_debian_sarge_p4 ?
Use PuTTY for it, run
Code:
rm -f /etc/init.d/saslauthd
vi /etc/init.d/saslauthd
Then paste the code from the tutorial into the file, and then run
Code:
chmod 755 /etc/init.d/saslauthd
/etc/init.d/saslauthd restart
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 19th January 2006, 18:32
daashag daashag is offline
Junior Member
 
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Copy and Paste did the trick.

Thanks for your help Falko.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reinstall SASLAUTHD? rosa hsiao Installation/Configuration 2 15th November 2010 13:47
Install hang at isapnp: No Plug & Play device found Neonblue Installation/Configuration 6 28th June 2008 10:08
saslauthd problem ... tmwtp Server Operation 11 16th October 2005 16:50
/stats doesn't work (password not accepted) Hellbound General 6 15th September 2005 15:34
saslauthd jeanjacques Server Operation 3 2nd August 2005 12:48


All times are GMT +2. The time now is 02:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.