Operating System - HP-UX
1833879 Members
1823 Online
110063 Solutions
New Discussion

user and group moving to another system

 
Joon
Occasional Contributor

user and group moving to another system

Hi all

I want to know how to move my user and it't group to another machine.

I am managing a K580 having about 500 user account.
Now I have to make exact same user account to a new N-class machine for migration.I cannot make about 500 user account newly.(so much time..) Is there any way to move my 500 users easily?

pleae let me know the users moving procedure in detail.(which files should I move and the procedures in detail...)

Thanks in advance for all of answerer..
jooni
6 REPLIES 6
Hoefnix
Honored Contributor

Re: user and group moving to another system

Just copy /etc/passwd /etc/group /etc/ftpusers(if exist)
to the new system and create all the home-dirs (or tar then and copy to the new system)

Regards,

Peter
Leif Halvarsson_2
Honored Contributor

Re: user and group moving to another system

Hi,
Perhaps the most easy way, set up a NIS server and NFS-mount the users home directorys.

If you want to duplicate users on the two servers, ftp the group and password file, make a tar file of the home directorys, ftp it to the other server and untar it.
Hoefnix
Honored Contributor

Re: user and group moving to another system

Elmar P. Kolkman
Honored Contributor

Re: user and group moving to another system

Depends... Do you have accounts on the N class server that need to be preserved? And is your K-class converted to trusted (no /etc/shadow and you have a /tcb directory)?

Also, do you want to keep the home directories of the users?

If not trusted and no preserving of account information on the N-class:
- copy /etc/passwd, /etc/group and /etc/shadow to the N-class.
- copy the home directories. (tar helps preserving ownership and rights).

If you need to preserve accounts, copy the files and then concatenate them, do a sort on the uid ('sort -nk3 -t:') and then look through the file for double entries (2 entries for root, for instance).
Every problem has at least one solution. Only some solutions are harder to find.
Mark Grant
Honored Contributor

Re: user and group moving to another system

Only copy /etc/passwd and /etc/group if you are sure the software you have running is the same on the new machine. Otherwise you need to merge the files, not copy them. That is only copy the user entries from /etc/passwd on the old machine into /etc/passwd on the new machine. Same for /etc/group. Otherwise, you may have software that requires a user to be set up and it isn't there any more.

Alternatively, if the new machine is going to be a clone of the old one, you may as well just use Ignite.
Never preceed any demonstration with anything more predictive than "watch this"
Todd McDaniel_1
Honored Contributor

Re: user and group moving to another system

if all things are equal. You only have to tar them up and copy over


tar cvf /home/ /tmp/home.tar
cppy over /etc/group /etc/passwd to the new box!

copy tarball to new box, then untar

tar xvf /tmp/home.tar

It should put it under /home since you used the full path to tar it up.
Unix, the other white meat.