LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash: command not found (https://www.linuxquestions.org/questions/linux-newbie-8/bash-command-not-found-89304/)

hamish 09-04-2003 03:53 PM

bash: command not found
 
Hey,

I was using the command line in order to add some users (my friends) to my computer so that they could log into RH9 on my PC.

I gave myself an account and one friend. Then I rebooted (a couple of hours later) and when I came to start back at it again, I get an error when I do it.

Screen like this:

[root@localhost root]# useradd sam
bash: useradd: command not found
[root@localhost root]#

What am I doing wrong? I did the EXACT same thing this morning and now it isn't working. Please help.

I have tried the same for adding groups, but I get the same error.

Can anyone think of problem? All suggestions are helpful, even if they are irrelivent, I like learning!!!

thanks
Hamish

DrOzz 09-04-2003 04:02 PM

i know it is a command but try typing the other method ::
adduser ?
or maybe /usr/sbin is not in your path...so try the full path if adduser doesn't work...

david_ross 09-04-2003 04:03 PM

How did you get to becoem root?
If you typed:
su

And not:
su -

Then you will only have your user PATH variable set which does not include /usr/sbin. If you use "su -" it will create a new shell for root. So wither run:
su -
useradd

or:
/usr/sbin/useradd

hamish 09-04-2003 04:07 PM

Hey,

thanks a lot guys, that is great. I have it all working now.

this forum is SO good for n00bs like me. Very helpful. With any luck, I will, one day, be able to help out other users.

cheers
Hamish

hamish 09-04-2003 04:41 PM

Hey,

one last thing for tonight,

Although I really want to do everything with command line, I would also like to learn about administering accounts with the GUI.

I know that RH8 had the linuxconf thing, but that no longer appears in RH and that it has been split into more specific GUIs. Which ones are these and where can I find them?

thanks loads
Hamish

david_ross 09-04-2003 04:45 PM

Try running:
redhat-config-users

There is a menu item for it - under system tools I think.

sol4718 02-23-2011 04:24 PM

the solution
 
just switch to the root account then vi .bash_profile

change it should look like this

PATH=$PATH:/usr/sbin:/sbin:$HOME/bin

then save it (by esc then shift : then type wq)(then type source .bash_profile)

this will make that the root will also look in the sbin folder

Vodkaholic1983 02-23-2011 04:28 PM

Quote:

Originally Posted by sol4718 (Post 4268991)
just switch to the root account then vi .bash_profile

change it should look like this

PATH=$PATH:/usr/sbin:/sbin:$HOME/bin

then save it (by esc then shift : then type wq)(then type source .bash_profile)

this will make that the root will also look in the sbin folder

lol mate this post is 8 Year's Old lol


All times are GMT -5. The time now is 02:33 PM.