Bash: Command Not Found
I installed Red Hat Enterprises 5
when I try to issue the commands useradd, usermod, or userdel it gives me the following error message: bash: useradd: command not found bash: usermod: command not found bash: userdel: command not found I checked these commands in the following path and I found them /usr/sbin/useradd /usr/sbin/usermod /usr/sbin/userdel what does that mean ???? pleassssss help meeee |
Hi and welcome to LinuxQuestions!
Most likely you are trying these commands as a normal user, whereas they are system commands reserved to the system administrator (that is the Linux super-user, named root). As you can see they are in the /usr/sbin directory, that according to the Filesystem Hierarchy Standard contains commands for which root's privileges are required. Indeed, if you check your PATH environment variable: Code:
echo $PATH In addition to the official Red Hat documentation, I suggest the more friendly "The Linux Command Line" book, that explains these basic concepts in a plain and clear way. |
when im using Level 5 then its works. but in GUI mode (level 7) didn't work....
|
I don't know what level 5 and level 7 are----it sounds like level 5 might have a root environment (different $PATH)
Check the PATH in both levels---but also try to simply enter "su" in a terminal to switch to root user. |
its called RUN Level's.
Alt+Ctrl+F5 or Alt+Ctrl (F1 to F7) F7 is full GUI mode. |
As a normal user, PATH does not include everything /sbin. Also, executables in /sbin are normally only executable by an EUID 0 user or root.
|
no, that is not run level (I think). Alt+Ctrl+F5 will give you a command window where you can log in as root, Alt+Ctrl F7 will give you a GUI where usually normal users are logged in.
/usr/sbin is available only for root, normal users are not allowed to use those tools (as it was mentioned before) |
Indeed, runlevels are not the same as different login screens https://en.wikipedia.org/wiki/Runlev...nux_and_Fedora
|
Quote:
run Code:
whereis useradd Code:
env | grep PATH Code:
export PATH=/sbin/:$PATH Code:
/usr/sbin/useradd username |
Thank u friends... Problem is solved... & once again thanks for help...
|
All times are GMT -5. The time now is 10:21 PM. |