Ubuntu Server 9.0 and Snort

Posted on 2009-12-28
Last Modified: 2013-12-15
I have a setup of snort / mysql / apache and base on a fresh load of ubuntu server.

I complied snort and for some reason I do not have a init.d script. I found one online and and it works if I run it /etc/init.d/snort start or if i run it from /etc/rc2.d/snort start

But it will not load on boot and i don't know why, i also tried to add the command to the rc.local and it still will not show as a running process from a fresh boot. If I log in and run snort -c /etc/snort/snort.conf or the init script from either /etc/init.d or rc2/3/4/5/  it will start up.

Question by:JasonPJohnson
    LVL 2

    Author Comment

    When it work i am logged on as root, when I log on as my regular user it seems to work...but it never really starts up that leads me to believe maybe the same thing is happing durring startup I have checked the permissions on the all the init files and links
    LVL 2

    Author Comment


    In my script the start command was like this "snort -c /etc/snort/snort.conf -i eth0 -D" if run as root it would perfectly from a terminal. If run from my regular account or on init it would fail but changing it to this /usr/local/sbin snort -c ...... it works now

    Points go to who can answer this for me :)
    LVL 39

    Accepted Solution

    During boot /usr/local is not yet considered a valid part of the path yet. (/etc/profile is not loaded...) like a login shell does.

    Therefore anything  out of /bin, /sbin, /usr/bin /usr/sbin are to be named explicitly (the environment is comparable to the one cron provides.).

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
    You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now