LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > 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
  Search this Thread
Old 11-03-2006, 09:20 PM   #1
man_J
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 .

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

Rep: Reputation: 38
useradd


Instructions...

useradd --help
 
Old 11-04-2006, 06:55 PM   #3
man_J
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
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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
konsolebox
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
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:23 PM.

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