Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

My file server which is running Linux Ubuntu 12.01, contains more than 30 users and its samba user accounts. Now I have an brand new machine, and want move all those user accounts from the old machine to the new one without re-creating all user accounts in the new machine.

Does anyone know how to do moving user account to a new machine please?

share|improve this question
Guide… nothing on samba though. – Rinzwind Nov 19 '12 at 7:41
Do you need to move only Samba users or All users account with their home folder and the OS too? – Achu Nov 19 '12 at 8:56
yes, i need to move all users accounts AND samba users account, because I have to change the new file server – Bruce Lok Nov 21 '12 at 2:54

I found the way to migrate all unix accounts, samba accounts and configuration from the old samba file server to new one. It is simple, justcopy the following files from the old filer server, then replace at the new file server:

/etc/passwd (User name and account info)
/etc/shadow (Passwords)
/etc/group (Group names and membership)
/etc/gshadow - Contains group encrypted passwords.

After copying completion, restart the following services

service smbd restart
service nmbd restart

Then all users login to new file server and share the files

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.