Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have added user using the adduser command, but a directory with is new user name is not created in /home, and I'm also not able to run any command with this user. After logging from this user it's only showing($) on the screen using a cli

share|improve this question

marked as duplicate by Takkat, Thomas W., Lucio, karel, Warren Hill Dec 21 '13 at 14:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 6 down vote accepted

Find and open Users and Groups. Delete that user, and create a new one

There is more on using it here.

Users and Groups


For command line, these should work:

useradd -m USERNAME

You have to use -m, otherwise no home directory will be created. If you want to specify the path of the home directory, use -d and specify the path:

useradd -m -d /PATH/TO/FOLDER USERNAME

You can then set the password with:

passwd USERNAME

All of the above need to be run as root, or with the sudo command beforehand. For more info, run man adduser.

Hope this helps smiley

share|improve this answer
    
i m working on Command line interface.. using the useradd command please tell me using commands.. – Simmerjeet Dec 20 '13 at 12:55
    
Edited it.... :-) – Wilf Dec 20 '13 at 13:03
1  
thanx hope this will help :) – Simmerjeet Dec 20 '13 at 13:10
1  
be careful, using the command line option (useradd) apparently doesn't default the shell to bash [!] askubuntu.com/questions/281217/… possibly suggest using adduser instead – rogerdpack May 11 '15 at 16:49
2  
There's the -s option to set their login shell with useradd, in case you're not able to use adduser for some reason. sudo useradd -m -s $(which bash) -G sudo <USERNAME> will create a new user with a home dir, bash login shell and the ability to sudo. – sundar Dec 15 '15 at 13:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.