1823250 Members
3319 Online
109648 Solutions
New Discussion юеВ

/bin/bash not found

 
SOLVED
Go to solution
Tonatiuh
Super Advisor

/bin/bash not found

Red Hat Enterprise Linux 4.

I receive an error message when I switch to oracle user:

[root@monitor etc]# su - oracle
-bash: [/bin/bash: No such file or directory

This error message is present only when I add the following lines to the /etc/profile

if [ $USER = "oracle" ]; then
if [$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

The "/bin/bash" file does exist.

If I delete the lines showed (from the /etc/profile the error messages does not appear anymore.

This lines was extracted from the oracle manual and never have had this problem.

Any idea?
5 REPLIES 5
Ivan Ferreira
Honored Contributor
Solution

Re: /bin/bash not found

Is that a exact copy paste of the profile? Ensure that you have a space between the [ ] and the test, that is:

if[$USER="oracle"];then
if[$SHELL="/bin/ksh"];then
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Tonatiuh
Super Advisor

Re: /bin/bash not found

It is a "copy and paste" of the part I have added.
Tonatiuh
Super Advisor

Re: /bin/bash not found

Problem solved. I omitted an space before the "$SHELL" variable.
THANK YOU!
Sung Oh
Respected Contributor

Re: /bin/bash not found

Hi Tonatiuh,

you should have /bin/bash shell for many scripts that are created by oracle.

you can run following command to check to see if you have bash shell installed on your system or not.
#rpm -qa --queryformat '%10{NAME} %20{GROUP}\n' | grep -i shells

also you can check to see if you have bach shell doc has been install on your system.
#rpm -qid bash

Regards,
Sung
Jeroen Peereboom
Honored Contributor

Re: /bin/bash not found

By the way, why do you modify the /etc/profile for this and not the ~oracle/.profile?
It seems like a modification only for the oracle user...

JP