Nigel Kendrick
2006-Nov-29 13:31 UTC
[CentOS] Copying user accounts (passwords) to another server
Hi Folks, I am doing a server swap out tomorrow and wondered if there was a utility that will copy user account details and their current passwords from one server to another (both CentOS 4) - there's only about 15 to do so it's not a major issue. Thanks Nigel Kendrick
Matthew Miller
2006-Nov-29 13:36 UTC
[CentOS] Copying user accounts (passwords) to another server
On Wed, Nov 29, 2006 at 01:31:48PM -0000, Nigel Kendrick wrote:> I am doing a server swap out tomorrow and wondered if there was a utility > that will copy user account details and their current passwords from one > server to another (both CentOS 4) - there's only about 15 to do so it's not > a major issue.copy the relevant lines from /etc/passwd/, /etc/shadow, /etc/group, and /etc/gshadow. (Actually, you can almost certainly ignore the last, but for completeness.) -- Matthew Miller mattdm at mattdm.org <http://mattdm.org/> Boston University Linux ------> <http://linux.bu.edu/>
Walt Reed
2006-Nov-29 13:43 UTC
[CentOS] Re: Copying user accounts (passwords) to another server
On Wed, Nov 29, 2006 at 01:31:48PM -0000, Nigel Kendrick said:> I am doing a server swap out tomorrow and wondered if there was a utility > that will copy user account details and their current passwords from one > server to another (both CentOS 4) - there's only about 15 to do so it's not > a major issue.Rsync and scp are your friend. You can either cut and paste the user info from the /etc/passwd, shadow, and group files manually, or copy the entire files which wiill also copy over all the system accounts (root password and such): cd /etc scp -p passwd shadow group newserver:/etc Then of course you will probably need to copy the user home directories over: cd /home rsync -aze ssh * newserver:/home