Solved

Gotchas when migrating users to a new Linux server?

Posted on 2007-11-28
6
506 Views
Last Modified: 2013-12-16
Hello all --

I am replacing a server we have in work with a new one I built.  The current server is running Fedora Core 6, and the newly-built server is running Fedora 8.  The current server is primarily acting as a fileserver via Samba, allowing centralized folders for all the WinXP machines in the lab, and each of these XP machines is backed up to the server every night.

Anyway, I've never transferred user settings (et. al) from one server to an entirely different one.  Also, I'm not proud, so I'll ask -- are there any "gotchas" I should be aware of when I undertake this move?

There are instructions at http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/ that look fairily comprehensive, and I know I'll need to transfer Samba users and the samba.conf file.  I'm also planning on using rsync to copy the /home directories from the old server to the new server via the network, so if there are any of the myriad rsync switches I should use or avoid, I'd appreciate the heads-up.

Basically, never having done this before, I'm trying to avoid the forehead-slapping moment when I realize I've forgotten something...

Thanks for all advice.
0
Comment
Question by:mjcoyne
  • 4
  • 2
6 Comments
 
LVL 14

Expert Comment

by:arrkerr1024
ID: 20377490
Nope, no gotchas - at least not for what you're doing.  Thats one of the beautiful things about linux/unix.  Just make sure that you copy the /etc/shadow, /etc/passwd, and /etc/group files over as outlined in that web page - excluding the system accounts.  Then just "rsync -a", the archive, -a, flag will preserve everything for you - make sure you use it.   You could also use -z to compress data if you want.

BTW, you might want to think about using CentOS-5 instead of Fedora.  It stays current for a lot longer, so you don't have to do these upgrades just to keep getting updates.  If you don't know, CentOS is just a free re-build of RedHat Enterprise.  Since they try to keep it stable and don't upgrade major versions of things it can get out of date, especially for graphical things, but for servers thats what you want.
0
 
LVL 17

Author Comment

by:mjcoyne
ID: 20379688
I considered switching to CentOS; I was aware of it.  It actually would be the sensible move, considering this is a working server and stabilty should be a priority goal, but I've got Fedora on my server at home, and I'm comfortable with it.  Plus, I'm a bit of a hacker, and I like things bleeding edge...:).

As for rsync,  the archive switch doesn't create an "archive" (similar to tar or gzip) does it?  I'm just trying to recreate the files on the new machine faithfully and ready for immediate use.  Ideally, I'd like to do the rsync transfer and pull the plug on the old machine.

Does the compression flag with rsync just save bandwith on the transfer, or is it for creating an archive (for lack of a better term), again like compression utilities?

Will SELinux file labeling be preserved with the rsync transfer, or will I need to relabel the new machine?

Final question on the rsync transfer -- is it better to run rsync on the new machine, and "pull" the files over, or run it on the old machine, and "push" the files to the new machine?

Thanks for your help...
0
 
LVL 14

Accepted Solution

by:
arrkerr1024 earned 500 total points
ID: 20385394
The archive switch means "preserver everything", like you're making an archive in the more conceptual sense - it doesn't mean make something like a tarball.

As far as comfort, thats the nice thing about fedora and redhat/centos, fedora is just the test bed for redhat - so they're almost identical except for newer packages in fedora - the installer is the same, package names are the same, etc.

The compression flag just compresses stuff when it is sent.  So it reduces bandwidth, but uses the CPU more.  If you're on a local network, don't use it.  If you're going over a slower link, especially if you have a fast processor, then it'd be worth using.

It doesn't matter at all which way you go.  A push and a pull will do exactly the same thing.

As far as selinux, you might have found your own problem.  The answer is no - it seems you need the latest version which supports the -X flag, and you need it on both ends.  Otherwise the copy will just inherit whatever settings the parent has.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 17

Author Comment

by:mjcoyne
ID: 20385604
Okay, rsync shouldn't be a problem.  The server in work has rsync-2.6.9-2.fc6 on it, according to the RPM database.  I can't check the new server from here (I'm at work, it's at my house waiting for me to haul it in here and pull the trigger on the replacement), but think it has 2.6.9-3.2 on it.

Maybe I'll just dig up my crossover cable and hook the machines together that way, rather than over a LAN...?
0
 
LVL 17

Author Closing Comment

by:mjcoyne
ID: 31411560
Tank you, arrkerr1024.  Things went very smoothly.
0
 
LVL 17

Author Comment

by:mjcoyne
ID: 20425057
That should, of course say "Thank you, arrkerr1024. Things went very smoothly." :)
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now