LinuxQuestions.org
Help answer threads with 0 replies.
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 09-04-2003, 03:53 PM   #1
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Rep: Reputation: 30
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
 
Old 09-04-2003, 04:02 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
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...
 
Old 09-04-2003, 04:03 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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
 
Old 09-04-2003, 04:07 PM   #4
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Original Poster
Rep: Reputation: 30
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
 
Old 09-04-2003, 04:41 PM   #5
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Original Poster
Rep: Reputation: 30
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
 
Old 09-04-2003, 04:45 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try running:
redhat-config-users

There is a menu item for it - under system tools I think.
 
Old 02-23-2011, 04:24 PM   #7
sol4718
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
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
 
Old 02-23-2011, 04:28 PM   #8
Vodkaholic1983
Member
 
Registered: May 2010
Distribution: Windows / Debian
Posts: 163

Rep: Reputation: 0
Quote:
Originally Posted by sol4718 View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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: command not found! Adil_uk Linux - General 14 04-09-2012 01:04 AM
bash: pg: command not found Chomper Programming 2 02-05-2005 02:22 AM
-bash: cp: command not found johnlittlepeap Fedora 2 11-15-2004 08:52 AM
bash -command not found- K3V Linux - Newbie 7 09-30-2004 03:57 PM
bash: command not found jc80 Fedora 3 03-14-2004 03:11 PM

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

All times are GMT -5. The time now is 07:23 AM.

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