Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-14-2007, 10:00 AM
|
#1
|
LQ Newbie
Registered: May 2007
Posts: 4
Rep:
|
error with script iptables:bad intereptor
im working with java ( windows os) i have to generate a file.sh from my prject this file should be executed on a linux machine
when i copy this file under /usr/bin
and execute ./file.sh(i've changed the acces mode: chmod +rwx)
i m having error
:bad interptor:aucun fichier ou repertoire
my file.sh containe
#!/bin/sh
iptables -A INPUT -j ACCEPT
is it the prbleme that this file is generated on windows os?
|
|
|
05-14-2007, 10:46 AM
|
#2
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
Could be. The DOS/Win end-of-line is traditionally CR-LF, vs. simply LF in Unix. Look at the file with 'od', and see if there are '0D 0A' eol sequences. If so, this may be the problem. I use the editor 'nedit' to perform eol translation. There is certain to be other tools to perform the translation, probably even 'tr' will work. The only other possible problem that I see is that '/bin/sh' does not exist. This seems unlikely on any major Linux distribution.
--- rod.
|
|
|
05-15-2007, 12:16 AM
|
#3
|
Member
Registered: Feb 2005
Location: ~h3av3n~
Distribution: RHEL 4, Fedora Core 3,6,7 Centos 5, Ubuntu 7.04
Posts: 227
Rep:
|
use:
dos2unix file.sh
regards.
|
|
|
All times are GMT -5. The time now is 09:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|