LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to add user in command shell (https://www.linuxquestions.org/questions/linux-software-2/how-to-add-user-in-command-shell-498453/)

man_J 11-03-2006 09:20 PM

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............

niknah 11-03-2006 10:26 PM

useradd


Instructions...

useradd --help

man_J 11-04-2006 06:55 PM

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

what the method to solution ?

farslayer 11-04-2006 07:37 PM

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

konsolebox 11-05-2006 08:09 AM

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


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