Bug 51844 - command not found .more help
command not found .more help
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
: 51839 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2001-08-15 15:22 EDT by Need Real Name
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-15 15:38:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-08-15 15:22:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
when I type  command, for example chkconfig or useradd or ifconfig, the 
error message is "bash:chkconfig:command not found." when I type "which 
useradd"  the error message is "no useradd found in...."
at the same time I can use vi,ls,pwd. if I reboot the system, the commands 
can work.I can add user or run ifconfig.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Additional info:

OUR KERNEL IS 2.2.16-4.LFS. The original kernel is 2.2.14. But I use
oracle 8.1.6 enterprise ,so I upgrade the kernel.
I found when I reboot the system, the same command can work. I notice
the lower case .
Comment 1 Need Real Name 2001-08-15 15:35:26 EDT
Could you help me? this is a bug or we did not config our system
Comment 2 Aaron Brown 2001-08-15 15:38:45 EDT
*** Bug 51839 has been marked as a duplicate of this bug. ***
Comment 3 Bernhard Rosenkraenzer 2001-08-15 16:01:24 EDT
Chances are you're just typing in wrong commands. chkconfig, useradd etc. live 
in /sbin and /usr/sbin, therefore they are not in the search path of normal 

If you want to call them up without the environment variables usually set for 
root, give the full location ("/sbin/chkconfig whatever").

If you are actually running as root, the most likely cause is that you removed 
/sbin and /usr/sbin from your PATH manually (e.g. by removing .bash_profile).

Comment 4 Need Real Name 2001-08-15 16:47:19 EDT
Yes, you are right. THANKS A LOT!!!!!!!

When I type "/usr/sbin/useradd aa', the command works. I can not find 
the .bash_profile of root user. DO you mean I should add the .bash_profile 
to root. what is the content of the .bash_profile? I have a .bash_profile of
our oracle user. The path parameter is "PATH=$PATH:$HOME/bin".

why after I reboot my computer,I type useradd without path,and the command 

Comment 5 Need Real Name 2001-08-15 17:12:15 EDT
Yes, I found there is a file:/root/.bash_profile. The path parameter
is "PATH=$PATH:$HOME/bin". I type "echo $HOME" The HOME parameter is
/root. So now what change should I make in order to run useradd in any
environment when I login as root?

Thanks in advance.
Comment 6 Need Real Name 2001-08-15 18:58:39 EDT
I am waiting for your answer. Do you think I should change .bash_profile 
under /root? How can I set the PATH in order to run chkconfig or useradd
in any directory as user root?



Note You need to log in before you can comment on or make changes to this bug.