Moving Users and their homedirectories to Another system (328 Views)
Reply
Occasional Contributor
Kunju
Posts: 6
Registered: ‎04-25-2007
Message 1 of 7 (328 Views)

Moving Users and their homedirectories to Another system

Hi,
I am looking for a best practise suggestion from you guys.
My scenario:
I am migrating one server from RP to RX. Server is running with oracle,sap and other application. The source system RP is on trusted mode and I need the user database need to be moved during Migration.
My Objective is users should not find any difficulty when they are login to the system. There are several application related users also they also need to be moved. Obviously as the user databse moving their home directories also.
On the target system should also be in trusted mode after migration.

Can you suggest me the BEST way to accomplish this?
Apprecate your repsonses.

Honored Contributor
Aashique
Posts: 542
Registered: ‎07-21-2007
Message 2 of 7 (328 Views)

Re: Moving Users and their homedirectories to Another system

Hi,
If the both the system OS are same. Then copy the /etc/passwd, /etc/group file from 1st server.And from /etc/passwd file create the user home directory,permissions using awk script.


Thanks & Regards

Aashique
Honored Contributor
Steven Schweda
Posts: 9,096
Registered: ‎02-23-2005
Message 3 of 7 (328 Views)

Re: Moving Users and their homedirectories to Another system

> Can you suggest me the BEST way to
> accomplish this?

No. Where are the disks now? Do you plan to
move them to the new server? Do you want to
run both servers at the same time during the
transition?

With these modern miracles like NFS, a user's
home directory can reside on a system other
than the one where he's logged in.

You can also do things like specify a user's
home directory as, say, /usr/users/user_name,
and make /usr/users/user_name a symbolic link
to the user's real home directory (which
could be anywhere). /usr/users can have the
same links on all systems, or a user can have
different home directories on some systems.

Many things are possible. How you move
things may depend on exactly what you need to
move.
Occasional Contributor
Kunju
Posts: 6
Registered: ‎04-25-2007
Message 4 of 7 (328 Views)

Re: Moving Users and their homedirectories to Another system

Steven,

The source server is runnign HPUX 11.11 and target server is running 11.23
We will shutdown and remove the source system after the successful migration. My concerned area is not the home diretories. I can move them somehow. My concern is the password the application related user Ids( Unix IDs).
My requirement is:
The source system is in trusted mode. After the migration, My target system should also be in trusted mode with the same OLD password.
Can you suggest now?

Thanks
Valued Contributor
Avinash Agarkar
Posts: 225
Registered: ‎10-26-2006
Message 5 of 7 (328 Views)

Re: Moving Users and their homedirectories to Another system

Hi,

You can copy the /etc/group, /etc/passwd, /etc/security
file with the same permission and restore it on the new system, I don't think the old passwd works for users they need to change the same at first login.

before copying the above file make the copy of original files on the new system. so some thing get wrong then it will be easy to revert back.

Thanks,
Avinash
Great Power Comes With Great Responsibility
Honored Contributor
Honored Contributor
TTr
Posts: 3,434
Registered: ‎01-22-2008
Message 6 of 7 (328 Views)

Re: Moving Users and their homedirectories to Another system

Since the source server is in trusted mode, in addition to copying all the relevant files from /etc, you have to copy /tcb. Whatever you do, ensure that you do thourough testing on the target system focusing on passwords and expiration dates after copying the user account info. When you are comfortable that all is well repeat the copying and cutover to the target.
I do not reply to forumers who 1) consistently don't assign points, 2) ask for step-by-step instructions for a topic but appear to have no IT experience and make no effort to learn. Some exceptions for newcomers and special topics.
Respected Contributor
BUPA IS
Posts: 236
Registered: ‎10-14-1997
Message 7 of 7 (328 Views)

Re: Moving Users and their homedirectories to Another system

Hello,
I can't say it is the best way this, in general is how we did one of ours.

First of all clean up your source system .

Backup /tcb /etc/passwd /etc/group /home

Run pwck grpck and authck -p -v and fix any anomalies.

Remove any old and unwanted users (this makes the copy quicker and easier to fix)

Backup passwd and group on your new system.
Now make sure you are logged in to the new system in two places the console and some where else (just in case ) .

I am assuming that the new system only has the standard users in it like root sys and so on.

Convert the new one to trusted.

Add any missing users present in the new system back into the old one make sure that the group and uid match on both systems. e.g. lp has the same number on both. If not fix the new system to match the old one and fix any related file ownerships on the new system.

If you copy a single tcb entry make sure the audit id does not conflict with an exsisting one. It is usually easier just to add it the with the uid you want and let the system manage the audit id.

Backup /tcb passwd and group again on the new system and move them out of the way. Now copy /tcb passwd and group across from the old system .

Sign on in third place with root and then with some other ids to test your copy .

good luck

Mike

Help is out there always!!!!!
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.