Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 mywiseguys.com/topic/… 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

1 Answer 1

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.
/etc/samba/*
/var/lib/samba/*

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

Bruce Lok
share|improve this answer

Your Answer

 
discard

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.