LinuxQuestions.org
Review your favorite Linux distribution.
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-07-2010, 03:19 AM   #1
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Rep: Reputation: 15
bash problem


Hello Linux Gurus

May I know how to fix this problem?

Everytime I type useradd username

I always get a message:

bash: useradd: command not found

please kindly someone guide me
 
Old 09-07-2010, 03:38 AM   #2
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 18.04 / CentOS 7.6
Posts: 397

Rep: Reputation: 62
The "useradd" command is not in your PATH. Are you running this as root?
 
Old 09-07-2010, 03:40 AM   #3
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by arashi256 View Post
The "useradd" command is not in your PATH. Are you running this as root?
yes sir, actually I'm adding a user through ssh on a distant location,
 
Old 09-07-2010, 03:46 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Try
Code:
whereis useradd
Then give the whole PATH to the command
If useradd doesn't exist, try
Code:
adduser
 
Old 09-07-2010, 03:53 AM   #5
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Original Poster
Rep: Reputation: 15
Cool

Quote:
Originally Posted by repo View Post
Try
Code:
whereis useradd
Then give the whole PATH to the command
If useradd doesn't exist, try
Code:
adduser
got it thanks
 
Old 09-07-2010, 03:59 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
got it thanks
Nice
You can mark the thread solved using the thread tools.


Kind regards
 
  


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
[SOLVED] bash : getopts problem in bash script. angel115 Programming 2 03-02-2009 10:53 AM
Reading a bash variable in bash scripting problem freeindy Programming 3 11-27-2008 02:29 AM
Bash Problem!!!! yeo_san Fedora 2 03-17-2007 03:42 AM
bash problem kenjiru Linux - General 2 01-30-2007 04:59 AM
Problem with BASH Pheidon Linux From Scratch 5 06-24-2005 02:34 AM

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

All times are GMT -5. The time now is 01:20 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