1827817 Members
1669 Online
109969 Solutions
New Discussion

Migrate Users

 
SOLVED
Go to solution
enrique Ortiz
New Member

Migrate Users

Hello
I installed a 'new' Hp9000 D270
and i want to migrate the users and prnters from another HP9000 to these,
its posiible ?? how ?

Thanks
kike
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: Migrate Users

If are careful to avoid conflicts with uid and group id, you can copy the /etc/passwd file over(not trusted) and cat the new entries onto the end of the /etc/passwd file

cat /root/passwd >> /etc/passwd

Same thing for group.

After you are done run these two checks.

pwck
grpck

You will probably want to tar up the home directories and move them too, with special attention to the contents of .profile

You'll need to think a bit.

No idea with regards to printers.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Christopher Caldwell
Honored Contributor

Re: Migrate Users

Sure - if you're not trusted, copy /etc/passwd from the old host to the new host; write a script to make all of the home directories; copy all of the content from oldhost/home to newhost/home.

If you're trusted, you need to copy over /tcb as well.

Generally, when I do this, I don't migrate data; I write a program to extract all of the /etc/passwd info [and password stuff out of tcb], then I write a useradd script to add the users "from scratch".
Stefan Farrelly
Honored Contributor

Re: Migrate Users


Migrating printers is easy. There is an option in SAM under printers to save your entire printer setup to a file, then copy it to the new server, then use SAM to recreate your printer setup.

Migrating users involves a bit more;
1. copying their entire home directories from one server to the new server.
2. copying users /etc/passwd entries and /etc/group entries to the /etc/passwd and /etc/group files on the new server, although its probably better to use the useradd command to create the new accounts on the new server - just create them the same as on the old server.
Im from Palmerston North, New Zealand, but somehow ended up in London...
A. Clay Stephenson
Acclaimed Contributor

Re: Migrate Users

If you are trusted, convert to untrusted using the tsconvert command. You can then simply copy the passwd and group files to the new box. Copy using tar or cpio /home to the new box.

Printers:

1) On the old box:
lpstat -t
Look for and cancel any really old unwanted print jobs. No point in taking them across.

lpshut

2) cd /
find ./var/spool/lp ./etc/lp -print | cpio -ocv > /tmp/lp.cpio

3) On the new box, install the new JetDirect software using swinstall - don't install JetAdmin; it is obsolete.

4) lpshut (if lpsched is running)

copy your /tmp/lp.cpio to the new box

cd /
cpio -icvdum < /tmp/cpio

5) If your old box was running JetAdmin, execute transferqueue local and respond "all". This will update your interface files.

6) Make sure that /etc/hosts, DNS, NIS(+) is setup so that host names are resolved as they were on the old box.

7) lpsched

Everything should now be setup including your old default printer.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Migrate Users

I should add if your old system was trusted, after transferring the passwd and group files to the new box, run tsconvert again to convert to trusted.
If it ain't broke, I can fix that.