Re: MAGIC: /usr/local/bin/bash: bad interpreter: Permission denied

2008-01-29 Thread Wojciech Puchar




Your script likely has as the first line:
#!/usr/local/bin/bash

I would suspect /usr/local/bin is not in the path of the problem accounts or


$ echo $PATH
/bin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/smietnik/tmp/bin
$ echo $PATH
/bin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/smietnik/tmp/bin
[EMAIL PROTECTED] ~]$ cat /etc/shells
/bin/sh
/bin/csh
/bin/tcsh
/usr/local/bin/bash

to make things more funny, /usr/local/bin/bash is a default shell for that 
(and other) account.


isn't in /etc/shells, or is restricted to run for only some users and groups. 
Check the bash executable doing:

ls -al /usr/local/bin/bash


[EMAIL PROTECTED] ~]$ ls -al /usr/local/bin/bash
-rwxr-xr-x  1 root  wheel  748288 15 cze  2007 /usr/local/bin/bash



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MAGIC: /usr/local/bin/bash: bad interpreter: Permission denied

2008-01-29 Thread Wojciech Puchar

what's up?


Now that's some seriously weird shit.

I've been toying around with it for a while, but so far I've been
unable to reproduce the problem.


me too. just SINGLE account. created same way as others.

to make things more fun - it uses /usr/local/bin/bash as default shell
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MAGIC: /usr/local/bin/bash: bad interpreter: Permission denied

2008-01-29 Thread Alphons Fonz van Werven

Wojciech Puchar wrote:


what's up?


Now that's some seriously weird shit.

I've been toying around with it for a while, but so far I've been
unable to reproduce the problem.

Alphons

--
VISTA - Viruses Intruders Spyware Trojans Adware

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MAGIC: /usr/local/bin/bash: bad interpreter: Permission denied

2008-01-29 Thread Bill Campbell
On Tue, Jan 29, 2008, Wojciech Puchar wrote:
i've got on one of my servers on just one account
when trying to run bash script (it is set to executable)

doing

bash ./scriptname

instead of

./scriptname

helps BUT

on other accounts, or root account - it works.

what's up?

My SWAG is that the directory is in a mounted file system with
``noexec'' as a security measure.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

We'll show the world we are prosperous, even if we have to go broke to do
it. -- Will Rogers
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MAGIC: /usr/local/bin/bash: bad interpreter: Permission denied

2008-01-29 Thread Derek Ragona

At 05:02 AM 1/29/2008, Wojciech Puchar wrote:

i've got on one of my servers on just one account
when trying to run bash script (it is set to executable)

doing

bash ./scriptname

instead of

./scriptname

helps BUT

on other accounts, or root account - it works.

what's up?



Your script likely has as the first line:
#!/usr/local/bin/bash

I would suspect /usr/local/bin is not in the path of the problem accounts 
or isn't in /etc/shells, or is restricted to run for only some users and 
groups.  Check the bash executable doing:

ls -al /usr/local/bin/bash
it should be executable by everyone.

-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MAGIC: /usr/local/bin/bash: bad interpreter: Permission denied

2008-01-29 Thread Wojciech Puchar


Check your script then, add:
set -x
near the top and see where it is complaining.


as i don't understand clearly where this set -x should be, i try 2 times:

1)

$ cat 1
#!/usr/local/bin/bash
echo abc
$ set -x
$ ./1
+ ./1
-bash: ./1: /usr/local/bin/bash: bad interpreter: Permission denied

2)

$ cat 1
#!/usr/local/bin/bash
set -x
echo abc
$ ./1
-bash: ./1: /usr/local/bin/bash: bad interpreter: Permission denied

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MAGIC: /usr/local/bin/bash: bad interpreter: Permission denied

2008-01-29 Thread Derek Ragona

At 10:11 AM 1/29/2008, Wojciech Puchar wrote:



Your script likely has as the first line:
#!/usr/local/bin/bash

I would suspect /usr/local/bin is not in the path of the problem accounts or


$ echo $PATH
/bin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/smietnik/tmp/bin
$ echo $PATH
/bin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/smietnik/tmp/bin
[EMAIL PROTECTED] ~]$ cat /etc/shells
/bin/sh
/bin/csh
/bin/tcsh
/usr/local/bin/bash

to make things more funny, /usr/local/bin/bash is a default shell for that 
(and other) account.


isn't in /etc/shells, or is restricted to run for only some users and 
groups. Check the bash executable doing:

ls -al /usr/local/bin/bash


[EMAIL PROTECTED] ~]$ ls -al /usr/local/bin/bash
-rwxr-xr-x  1 root  wheel  748288 15 cze  2007 /usr/local/bin/bash


Check your script then, add:
set -x
near the top and see where it is complaining.

-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MAGIC: /usr/local/bin/bash: bad interpreter: Permission denied

2008-01-29 Thread Wojciech Puchar


what's up?


My SWAG is that the directory is in a mounted file system with
``noexec'' as a security measure.


EXACTLY.

thanks for Derek Ragona [EMAIL PROTECTED] for helping me to 
find it :)



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]