Operating System - HP-UX
1820540 Members
3100 Online
109626 Solutions
New Discussion юеВ

Migrate users account from server A to server B

 
Ngoh Chean Siung
Super Advisor

Migrate users account from server A to server B

Hi,

Is there any way to migrate all the users account including users home directory from server A to server B instead of need to create user account one by one in server B?

regards.
5 REPLIES 5
Sivakumar TS
Honored Contributor

Re: Migrate users account from server A to server B


Hi,

One Simple way is to copy the /etc/passwd file from Server A to Server B.

Regards,

Siva.
Nothing is Impossible !
Arunvijai_4
Honored Contributor

Re: Migrate users account from server A to server B

Hello,

You can copy the following from Server A to Server B.

/etc/passwd
/etc/group
/home
/var/spool/cron

In case of Trusted systems, Copy

/tcb as well.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Devender Khatana
Honored Contributor

Re: Migrate users account from server A to server B

Hi,

Copy /etc/passwd, /etc/group from serverA to server B but it will not preserve the existing user accounts on serverB, if you want to preserve them then append entries of /etc/passwd on serverA to that of serverB.

HTH,
Devender
Impossible itself mentions "I m possible"
MarkSyder
Honored Contributor

Re: Migrate users account from server A to server B

When you say you want to copy the home directory, do you mean you want to copy the contents of the home directories? If so, I would recommend Data Protector (or Omniback if you are using 10.20). You can back up the home directories on to tape then restore them on to the new server.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Ngoh Chean Siung
Super Advisor

Re: Migrate users account from server A to server B

Hi,

I hv created an user account with login name as ncs in server A. Actually I want to migrate this user id from server B to server A. In order to preserve the user password at server B, I hv copied the ncs file from server B /tcb/files/auth/n to server A. I don't copy the entry from /etc/passwd from server B to server A. I able to login but the user id(UID) is diff between /etc/passwd & /tcb/files/auth/n

Below is the diff for /tcb/files/auth/n/ncs between 2 servers
server A:
ncs:u_name=ncs:u_id#129:\
:u_pwd=P6RuJxtEmE8Sg1DIt0VDIoi.jc2OgNv2Zf6:\
:u_auditid#386:\
:u_auditflag#1:\
:u_succhg#1139966489:u_unsucchg#1128497238:u_pswduser=ncs:u_suclog#1142501475:\
:u_suctty=pts/to:u_unsuclog#1142407526:u_unsuctty=pts/t1:u_lock@:\
:chkent:

server B
ncs:u_name=ncs:u_id#138:\
:u_pwd=AGTGLLXIP8mWA:\
:u_auditid#277:\
:u_auditflag#1:\
:u_succhg#1142501503:u_unsucchg#1141980009:u_suclog#1142501536:u_suctty=pts/tO:\
:u_unsuclog#1142501488:u_unsuctty=pts/tO:u_lock@:chkent:

Questions:
1) Any impact that I just copy /tcb/files/auth/n/ncs only without /etc/passwd?

2) Due to I already create user account called ncs in server A, any impact if I copy ncs entry from server B /etc/passwd and overwrite it at server A?

regards.