Migrating users from old machine to new machine

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Migrating users from old machine to new machine
# 1  
Old 11-06-2013
Migrating users from old machine to new machine

What is the best way to move all user, with permission etc... from a old linux redhat 5 to a new redhat 6 machine. It is as simple as coping the etc/passwd file etc.. ?
# 2  
Old 11-06-2013
..and files in /etc/security like opassswd; not to mention the home directories.
# 3  
Old 11-06-2013
Remember that the encrypted passwords will be held in /etc/shadow and if you have a password history, they are in /etc/security/opasswd as listed by blackrageous

Overall, it's probably safer to script up a process to read the /etc/passwd, /etc/group and other files to generate new users. Remember that files are actually owned by the UID, so you will need to keep them consistent to maintain file ownership.




Robin
Liverpool/Blackburn
UK
# 4  
Old 11-06-2013
yeah I accidently move a director, but as you said all the ownership info was duffed up, so plan was to move all the files etc/passwd,group,shadow etc.. and then tar ball the directories and move them into place, that should keep all the ownership, and permission in tact right?
Thanks all!
# 5  
Old 11-06-2013
I just had to do something similar-
Instead of using tar, I used rsync. This way I could keep updating until the final cutoff.

Here is an example of something I used.Note that we had another directory under /export/home/XXXX, not at the previous level of just /export/home. This is done using root.

You can do a dry run by using the -n flag at the end of the command as well.

rsync -avzH --progress /export/home/XXXXXX (host name):/export/home/
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with fetching the data from remote machine from my jumpbox(local machine)

Team, Presently i am running a script from my local box(i.e jumpbox) to all the remote machines.Basically fetching basic queries like pwd,mkdir,touch etc and i am able to successfully fetch it from my local machine.But when i want to check certain database related queries like the dbstat... (20 Replies)
Discussion started by: whizkidash
20 Replies

2. Red Hat

iptables applied in local machine, can't ssh remote machine after chain changed to DROP

I want to SSH to 192.168.1.15 Server from my machine, my ip was 192.168.1.99 Source Destination was UP, with IP 192.168.1.15. This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's because I need to apply the same rules in... (2 Replies)
Discussion started by: babinlonston
2 Replies

3. Linux

Unable to connect to Server machine from a client machine using ftp service

Hi, Could you please help me with the below issue.. I'm running RHEL6 OS on both server (192.168.0.10) and client machines (192.168.0.1). I'm trying to connect to server from the client machine using ftp service. I have installed vsftpd daemon on both the machines. I'm getting... (4 Replies)
Discussion started by: raosr020
4 Replies

4. UNIX for Advanced & Expert Users

FTP While transfering files to local machine to remote machine

Hi Am using unix Ksh Am getting the problem while transferring zero size files through the script . When i transfer zero size files from local machine to remote machine manually i can able to do it . My question its beause of zero size files am not able to transfer through script ? or its... (2 Replies)
Discussion started by: Venkatesh1
2 Replies

5. AIX

Help migrating bash script to AIX machine

hey frnds I am trying to migrate a bash script over the AIX machine , but was getting error with ps and read commands, so I make the few changes in script and have also chnaged the shell from bash to ksh below is my script... (5 Replies)
Discussion started by: sumit_saxena
5 Replies

6. Shell Programming and Scripting

How to transfer files from unix machine to local machine using shell script?

Hi All.. Am new to Unix!! Am creating a shell script in which a scenario is like i have transfer the output file from unix machine (Server) to local directory (Windows xp). And also i have to transfer the input file from the local directory to Unix machine (Server) Any help from you... (1 Reply)
Discussion started by: vidhyaS
1 Replies

7. Solaris

How many users are there in solaris machine ?

Dears How can i find , how many users are in solaries machine ? any command please . regards Halim (6 Replies)
Discussion started by: Halimju
6 Replies

8. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

9. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

10. UNIX Desktop Questions & Answers

Creating New Users in UNIX Machine !!!

Hi How to create users in the UNIX machine .... I am the ROOT and i want to create users with normal privileges . a) Please give the sequence of commands which i need to use. b) How to set their userid and passwords (3 Replies)
Discussion started by: skyineyes
3 Replies
Login or Register to Ask a Question