Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

Ubuntu Server 9.0 and Snort

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.

  • 2
1 Solution
JasonPJohnsonAuthor Commented:
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
JasonPJohnsonAuthor Commented:

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 :)
nociSoftware EngineerCommented:
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now