Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-03-2006, 09:20 PM   #1
LQ Newbie
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
how to add user in command shell

hi all,
i want to add user in shell script but can not find method to make it ,plz i am a hope to help me .
or any book or link to help me get method .

Old 11-03-2006, 10:26 PM   #2
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38


useradd --help
Old 11-04-2006, 06:55 PM   #3
LQ Newbie
Registered: Oct 2006
Posts: 7

Original Poster
Rep: Reputation: 0
yes i am wrote this instruction but show
bash : useradd : command not found

what the method to solution ?
Old 11-04-2006, 07:37 PM   #4
LQ Guru
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
su - to root first.. then useradd <options> <username> Unless you are in ubuntu then you would use sudo (sudo useradd <options> <username>)

And when I say 'su -' I mean exactly that, use the hypen when you su otherwise you will not get roots environment and it will be unable to find simple commands such as useradd

you should put your distro in your profile, it would be easier to give specific help if we know what you are running
Old 11-05-2006, 08:09 AM   #5
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
if you're already root and useradd still doesn't work run:

# find -type f /bin /sbin /usr/bin /usr/sbin | grep useradd'

If you see useradd, perhaps the directory containing the file is not included in the PATH variable. Just run the command using its absolute path. for example:

# /bin/useradd
# /bin/useradd --help


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
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
How To Add user in Fedora Core 4 using the Command Line Interface regnox Linux - Newbie 9 08-22-2005 12:30 AM
Add user to Webmin through SHELL? mikeshn Linux - General 1 12-05-2003 02:00 PM
Add a user thorugh SHELL? mikeshn Linux - General 4 01-08-2003 10:31 PM
Add User Shell Script DAC Programming 2 10-13-2002 03:12 PM > Forums > Linux Forums > Linux - Software

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration