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

I have a user profile all setup with all settings the way I want them. I want to copy the entire configured profile to a new user account.

This is what I'm doing (user is already added to system):

  1. Log out, switch to terminal, service gdm stop.
  2. mkdir /home/newuser
  3. cp -a /home/olduser/* /home/newuser/
  4. chown newuser:newuser /home/newuser -R
  5. service gdm start

Then I log in as newuser. When I log in, the desktop looks like a brand new user profile and not the customized profile that I copied.

I want everything in the new profile. The theme, where the docks are located and configured, desktop icons, firefox favorites, etc.

Any idea why this isn't working? I am using Ubuntu 10.04

share|improve this question
up vote 3 down vote accepted

OK, I figured it out. Apparently cp /* skips dot files.

You have to explicitly copy dot files with:

cp -a /home/olduser/.* /home/newuser/

And to copy everything do both:

cp -a /home/olduser/* /home/newuser/
cp -a /home/olduser/.* /home/newuser/
share|improve this answer
The bash shell has an option dotglob (you can set it with shopt—see the bash manual for more info) which, if set, makes * match files starting with a dot too. – JanC Jan 31 '12 at 19:17
Oh, and you might want to "accept" your own solution so that this question is marked as answered... – JanC Jan 31 '12 at 19:19
+1 for the dotglob comment. There's a waiting period on accepting answers too soon... – Nick Feb 1 '12 at 17:41

You will need to do more then that.

sudo mv /home/new_user /home/new_user.bak
sudo cp -R /home/old_user /home/new_user
sudo chown -R new_user:new_user /home/new_user

Log into the new user account. If all is working, delete the backup

sudo rm -rf /home/new_user.bak
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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