Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 07-05-2004, 01:35 PM   #1
Registered: Aug 2002
Location: Atlanta
Distribution: Redhat Linux 7.2 & 7.3 + 8.0
Posts: 59

Rep: Reputation: 15
Firewall-2.4 on Redhat Enterprise Linux 3.0

Hello All,

I am at my wit's end and need some help. I am running thje firewall-2.4 stroger script on Redhat 7.3 currently with no problem


I just got a copy of redhat enterprise Linuux 3.0 and I am trying to replace the 7.3 box with rhel 3.0 .

Now here is the confusion, I cannot seem to run this same script on rhel 3.0. When i try running it manually from command line, I get the error:

[root@mybox root]# ./firewall.iptables
: bad interpreter: No such file or directory

When I place the script in the /etc/rc.d/init.d folder and create the appropriate links to the runlevels I want and boot up I get this error instead:

execvp: nosuch file or directory

As you can see from the script, it has the apropriate path to sh (i.e. #!/bin/sh).The bad Interprator seems to indicate it cannot find the sh or bash shell or something. Which is really weird because it works without a hitch on Redhat 7.3.

I have read various posts about this problem but could not find a conclusive fix for it . I found some hints that seem to indicate the execvp error is created by the /etc/rc.d/init.d/functions script but again no definite fix.

I am desperate and any help or suggestion will be greatly appreciated.

Old 07-05-2004, 04:00 PM   #2
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Prove where sh is...
which sh

Then make sure all the other programs are where they are in the script.
iptables would only be in /usr/local/sbin/ if it was built from sources rather than an rpm..

Do iptables-save to see how much of the script has run. It can give a clue on where it's dying..

Also do /etc/init.d/iptables clear to reset the firewall to open and ACCEPT
Make sure iptables isn't being run at any runlevel or it will clear your firewall..
Old 07-06-2004, 01:18 PM   #3
Registered: Aug 2002
Location: Atlanta
Distribution: Redhat Linux 7.2 & 7.3 + 8.0
Posts: 59

Original Poster
Rep: Reputation: 15
execvp: No such file or directory

Thanks for your response. I did the which sh and it is in the right place. /bin/sh. The script doesnt even run, it fails. I posted this problem on and I got this response back which does not make sense because as I mentioned the same script works on redhat 7.3 with no issues.

This is what I got from redhat:

Its almost like it can's run a shell script.

Help .. Please.....
Old 07-07-2004, 11:43 PM   #4
Registered: May 2004
Posts: 552

Rep: Reputation: 31
check the file for crlf line endings, if the first line #!/bin/sh ends in crlf that is the error you will get


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
RedHat Enterprise Linux WS IcoNyx Linux - Software 1 09-19-2005 03:39 AM
RedHat Enterprise Linux velan Red Hat 28 11-07-2004 05:33 PM
redhat enterprise linux vinu1974 Linux - Newbie 19 08-30-2004 07:58 AM
RedHat enterprise Linux Help sarika_ni Red Hat 2 12-20-2003 12:48 PM
RedHat Enterprise Linux sarika_ni Linux - General 0 12-20-2003 12:55 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration