Snort mailing list archives

Re: cannot start snort service


From: "Donnie Green Jr" <d_greenjr () hotmail com>
Date: Wed, 12 Mar 2003 08:18:58 -0500

It is really weird that /sbin is in my path as the user I login as and as
root but the command cannot be found. When I do a "which pidof" /sbin/pidof
is found.  The really weird thing is that I do not have a problem when
executing "/etc/rc.d/init.d/snort start"  which is the same as script when
executing "service snort start".  BUT when I use service snort start I get
the error.

Well I added the full path to pidof (/sbin/pidof) and all works fine.  I am
still trying to find out why the error occurred.

Thanks All.

----- Original Message -----
From: "Poppi, Sandro" <Sandro.Poppi () wacker com>
To: <snort-users () lists sourceforge net>
Cc: "'Donnie Green'" <d_greenjr () hotmail com>
Sent: Wednesday, March 12, 2003 6:58 AM
Subject: AW: [Snort-users] cannot start snort service


Donnie,

from the script you start snort the program "pidof" is called which is
located in /sbin/pidof which in turn is a symbolic link to /sbin/killall5.
Both are provided by the rpm SysVinit which is more than likely to be
installed on every RH 8.0 installation ;)

Have a look if /sbin/pidof is available. It may be that /sbin is not in
the
path of executables (root should have /sbin in its path though). You may
change any occurance of pidof with /sbin/pidof in /etc/init.d/snort as a
workaround, or add /sbin to root's path.

I'm assuming you're logged in as root :)

HTH,
Sandro

Problem Description:
When I attempt to start the service using the command
"service snort start"
I get the following error:

Starting Intrusion Database System: SNORT
/etc/init.d/snort: pidof: command not found

1) I am running snort-1.9.1 on RH8.0
2) Default init is 5
3) /etc/init.d/snort linked to /etc/init.d/rc5.d/S11snort
4) snort exec: /usr/local/bin/snort
5) snort.conf: /usr/local/snort/etc/snort.conf

Additional Information:
I am successful in starting snort from the command line using
/usr/local/bin/snort -c /usr/local/snort/etc/snort.conf -i eth0

Configuration Files:

/etc/init.d/snort (which has a symbolic link to S11snort in rc5.d)
#!/bin/bash
# $Id: S99snort,v 1.1 2001/12/18 22:14:37 cazz Exp $
# /etc/init.d/snort : start or stop the SNORT Intrusion
Database System
#
# Written by Lukasz Szmit <ptashek () scg gliwice pl>
#
# Configuration

# set config file & path to snort executable
SNORT_PATH=/usr/local/bin
CONFIG=/usr/local/snort/etc/snort.conf

# set interface
IFACE=eth0

# set GID/Group Name
SNORT_GID=nid

# other options
OPTIONS="-D"

# End of configuration


test -x $SNORT_PATH/snort || exit 0

case "$1" in
      start)
         echo "Starting Intrusion Database System: SNORT"
         $SNORT_PATH/snort -c $CONFIG -i $IFACE -g $SNORT_GID $OPTIONS
         if [ "`pidof $SNORT_PATH/snort`" ]; then
                 echo "SNORT is up and running!"
         else
                 exit 0
.......skipping.....






_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: