Red Hat Bugzilla – Bug 51844
command not found .more help
Last modified: 2007-04-18 12:35:56 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):
Steps to Reproduce:
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 .
Could you help me? this is a bug or we did not config our system
*** Bug 51839 has been marked as a duplicate of this bug. ***
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).
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
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.
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?
ARE YOU OFF NOW?