LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 11-19-2007, 01:37 PM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 719

Rep: Reputation: 39
Migrating the passwd and group files from an old to a new server


Hi there --

I am in the process of replacing one of our servers with a new model, and I would like to migrate the existing user and group accounts over from the old to the new. Here is what I had in mind:

I would copy the passwd and group files from the old to the new server, and save them in a temporary directory. I would then run the cat command on the new server's /etc/passwd file and output it to a text file. I would then run the same command the passwd file that was copied over using the ">>" option to append it to the same output file. I would then edit the output file for any overlaps that might exist. The same steps would then be run the group files. The new files would then replace the new server's existing passwd and group files.

Once that was done, I would run the pwconv command to create the appropriate shadow entries.


My question is, would the above procedure work, or should I try something else? Thanks.
 
Old 11-19-2007, 03:23 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
The procedure you are describing should work fine. One other thing you may want to check is that all the shells that are listed in the password file are valid. To get a list of all the shells in your passwd file:
Code:
awk -F: '{print $7}' /etc/passwd | uniq
HTH

Forrest

Last edited by forrestt; 11-19-2007 at 03:32 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/group and /etc passwd files ygloo VectorLinux 3 09-21-2006 08:23 PM
restoring passwd/group files jhaiduce Fedora 1 10-20-2004 11:05 AM
migrating BSD to Slackware passwd file bgovoni Linux - General 0 04-22-2004 06:31 PM
Trouble after copy shadow, group and passwd to ltsp server tapanga Linux - General 1 04-19-2004 01:59 PM
passwd group, what else do I need? khutze Linux - Software 0 02-13-2003 06:49 PM


All times are GMT -5. The time now is 12:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration