Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 may be a rookie mistake, but I created a user (new user) in Linux on a Ubuntu system and didn't actually create the home directory for this user. Now, when I log in, it says there are problems... If I delete the path home/<new user> and try to log in the system tells me I can use root as home directory but I will likely experience problems, and then it won't let me log in.

What is the best way to create this directory with the appropriate permissions? Should I just create another user and delete this one? I need some help...

share|improve this question
up vote 2 down vote accepted

Create the directory, chown it to <new user>:<new group>, chmod it 0700, and copy all the contents, including hidden files, of /etc/skel to the new home directory.

share|improve this answer
...and then make sure the path to that directory is set properly as the user's home in /etc/passwd ... also, it's probably better to copy the contents of /etc/skel to the new home directory before chown -ing and chmod -ing it. – quack quixote Apr 29 '10 at 21:24
Right, yes. Copy, then change permissions. Files should be 0600, directories should be 0700. – Ignacio Vazquez-Abrams Apr 29 '10 at 21:40
Thanks for the comments and help! – nicorellius May 1 '10 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .