LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-10-2005, 04:13 AM   #1
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Rep: Reputation: 15
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
 
Old 10-10-2005, 05:15 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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.
 
Old 10-10-2005, 05:55 AM   #3
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Original Poster
Rep: Reputation: 15
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
 
Old 10-10-2005, 05:59 AM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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?
 
Old 10-10-2005, 07:29 AM   #5
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Original Poster
Rep: Reputation: 15
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
 
Old 10-10-2005, 07:41 AM   #6
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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.

Last edited by jtshaw; 10-10-2005 at 07:42 AM.
 
Old 10-11-2005, 01:15 PM   #7
nakedape
LQ Newbie
 
Registered: Jul 2005
Location: Bucharest, RO
Distribution: SUSE 9.3
Posts: 7

Rep: Reputation: 0
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.
 
  


Reply



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
bash: run a script at most 3 times simultanously paterijk Programming 4 08-18-2005 02:49 PM
Bash script to alert by email 3 times then stop. pmpc00 Linux - General 2 11-04-2004 07:23 AM
bash script not working :'( aesahaettr Linux - Software 5 05-12-2004 01:08 AM
bash / sh not working (not recognized?) hallamigo Linux - Newbie 5 04-12-2004 06:08 PM
Bash script not working AMMullan Linux - General 2 09-28-2003 07:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:32 PM.

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