LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
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.

Notices

Reply
 
Thread Tools
Old 11-03-2006, 10:20 PM   #1
man_J
LQ Newbie
 
Registered: Oct 2006
Posts: 7
Thanked: 0
how to add user in command shell


[Log in to get rid of this advertisement]
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 .

thanks............
man_J is offline     Reply With Quote
Old 11-03-2006, 11:26 PM   #2
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 460
Thanked: 11
useradd


Instructions...

useradd --help
niknah is offline     Reply With Quote
Old 11-04-2006, 07:55 PM   #3
man_J
LQ Newbie
 
Registered: Oct 2006
Posts: 7
Thanked: 0

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

what the method to solution ?
man_J is offline     Reply With Quote
Old 11-04-2006, 08:37 PM   #4
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: Debian Lenny / Squeeze / Sid
Posts: 7,213
Blog Entries: 5
Thanked: 246
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
farslayer is offline     Reply With Quote
Old 11-05-2006, 09:09 AM   #5
konsolebox
Member
 
Registered: Oct 2005
Location: Philippines
Distribution: Gentoo, Slackware
Posts: 957
Thanked: 15
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
konsolebox is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 8 07-26-2009 12:54 PM
How To Add user in Fedora Core 4 using the Command Line Interface regnox Linux - Newbie 9 08-22-2005 01:30 AM
Add user to Webmin through SHELL? mikeshn Linux - General 1 12-05-2003 03:00 PM
Add a user thorugh SHELL? mikeshn Linux - General 4 01-08-2003 11:31 PM
Add User Shell Script DAC Programming 2 10-13-2002 04:12 PM


All times are GMT -5. The time now is 08:10 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration