Moving linux users

Posted on 2005-03-04
Medium Priority
Last Modified: 2013-12-15
Hi, I have a SuSe 9.1 box serving terminals with a whole bunch of users on it, I wish to move all these users to a redhat box, is there an easy way to do this?

I can easly copy and paste the /home directory but don't know how to move the usernames and passwords files so these chaps can seamlesly log in again.
Question by:iqula
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

marxy earned 1600 total points
ID: 13460158
You need
1. Move homes. Usually they are in /home
On source (suse)
tar cfvz homes.tar.gz /home

On target (redhat)
tar xfvz homes.tar.gz /

2. Move group and users and passwords
copy these files to redhat

NOTE: These files contain not only users. These are system accounts too.
If they are different on suse and redhat do the following.
- copy these files somewhere
- remove values with id's lower than 500 (usually users accounts start with 500)
- paste the rests of the files to redhat files
LVL 12

Expert Comment

ID: 13464044
If all of the users are configured as system users (/etc/passwd), then no, there isn't an "easy" way to do this.

You mention you want to go from SuSE 9.1 to RedHat. The last RedHat release (other than enterprise level server software) is 9.0, and is much older than SuSE 9.1. Are you really going to move the users to RedHat? Or, is it Fedora?

At any rate, why would you move the users from a distribution that supports the Linux Standards Base and was the first mainstream release to use the 2.6 kernel? What's so appealing about RedHat?

I've used both, and in my mind, there's no comparison - SuSE is far superior.
LVL 38

Assisted Solution

wesly_chen earned 400 total points
ID: 13464557

  Some comments I would add to marxy's method:
1. Make sure the all user's home directories are the same. Also make sure the RedHat box has enough space in home directory.
   marxy's method has already preserve the uid/gid as well as the /home directory path. If you have user's home dirs are not under
   /home, then you need to use tar to copy over.

2. Append those 3 files (passwd, shadow, group) from SuSE to RedHat.
cat /etc/passwd_suse >> /etc/passwd
cat /etc/shadow_suse >> /etc/shadow
cat /etc/group_suse >> /etc/group
 Then edit those 3 files to remove duplicated account  which is original in SuSE's files, such as system accounts or application
accounts (bin, sys, mysql, ldap etc...).
   I hope this help.



Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month11 days, 2 hours left to enroll

770 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