Server Fault is a question and answer site for system and network administrators. 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

Is there a way to copy user list (with data and passwords) from one server to another.

We have two servers and one of those is new. I need to create same users (that exist in /home/) and set same passwords (if possible) sure /home/ dir will be copied also for the configs.

To be specific its Ubuntu server 10.04.1.

Linux <name> 2.6.18-238.5.1.iv.028stab085.3 <time> i686 GNU/Linux

share|improve this question
up vote 6 down vote accepted

These are the files you would usually need to copy:

share|improve this answer
What about other users (www-data or ftp)? Won't the ID's mix up? – JackLeo Jun 1 '11 at 19:06
@JackLeo - if the servers are both Ubuntu, then the system accounts should all have the same IDs (if they didn't, upgrades wouldn't work). – JimB Jun 1 '11 at 20:19

You'll need to copy /etc/passwd, /etc/shadow and /etc/group along with the home directories

share|improve this answer
You forgot at least about mail spools and cron tabs. – AlexD Jun 1 '11 at 14:48
Also forgot gshadow. While group passwords are rarely used anymore, some tools will throw errors if group and gshadow are out of sync. – JimB Jun 1 '11 at 15:09

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.