LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Many times Bash is not working why? (https://www.linuxquestions.org/questions/linux-newbie-8/many-times-bash-is-not-working-why-371454/)

sathyguy 10-10-2005 04:13 AM

Many times Bash is not working why?
 
Friends,

I have Linux AS 3.0
Today i typed "service network start"
its saying "Bash: command not found" or something....
Also, "init 6" is also not working.....
Only "reboot" is working....
Sometimes above commands are all working....
So, how can i find out the bash version?
Also, where can i download the latest bash version?
please help me in installing the new bash version or if the bash is crashed how can i rectify it.

Thanks & Regards,
Sathyguy

jtshaw 10-10-2005 05:15 AM

I'm guessing it works when you are root and doesn't when you aren't? This isn't a bash problem, it is a PATH/permissions problem. The service command is probably in /sbin (or /usr/sbin) which would only exist in root's path on a standard setup. The init command is likely only runable by root as well.

To find out what version of bash you are running type bash --version in a terminal.

You should see something like this:
Code:

GNU bash, version 3.00.16(1)-release (i686-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.


sathyguy 10-10-2005 05:55 AM

No, I tried in Root as well as normal user.
In both the logins those are commands are not working.
Below is my bash version. Where can i get the latest bash version. And how can i update my bash version.
Code:

GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.

Also, how can i set the path to make the bash to work for a normal user ?

thanks & regards
sathyguy

jtshaw 10-10-2005 05:59 AM

Gnu Bash.

The above link is the homepage for Gnu Bash.. however, I promise you it is not the version of bash that is causing your problem.

When logged in as root what does echo $PATH show you?

sathyguy 10-10-2005 07:29 AM

as a root:
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin

as a user09:
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/user09/bin

how can set the path for both the users as same?

Thanks
sathyguy

jtshaw 10-10-2005 07:41 AM

The global default path for people is typically set in /etc/profile.

However, you probably don't want your users to have the same path as root, as they shouldn't have permissions to run much of anything in the sbin directories anyway (and for good reason).

If you type whereis service as root what does it show? On my RHEL3 system it is in /sbin.... I imagine it is the same on RHAS3 as well. Regardless of where it is, if the directory it's in is in your PATH as root then you should be able to run it unless it isn't marked as executable.

nakedape 10-11-2005 01:15 PM

I have the same problem; "service" does not seem to be recognized as a command.

When i type "echo $PATH" i get:

Code:

/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin
but unfortunately that doesn't say much to me ...
Then if i type "whereis service" i only get this:

Code:

service:
and nothing else.
Any help would be greatly appreciated. Thanks in advance.


All times are GMT -5. The time now is 11:44 AM.