Operating System - HP-UX
1833700 Members
3568 Online
110062 Solutions
New Discussion

Re: copy users and printers

 
Jeff Hagstrom
Regular Advisor

copy users and printers

What is the steps to copy all users and printers from one hpk460 to another. I am trying to get an hpk460 box ready to deploy out of Florida because of IVAN. We don't have a unix admin so I'm relying on the forum and some boxes. Thanks,
8 REPLIES 8
Jeff Hagstrom
Regular Advisor

Re: copy users and printers

HPUX-11.00 on HPK460/9000
RAC_1
Honored Contributor

Re: copy users and printers

Copying users.

1. Is the system in trusted mode(C2) or not?
If in trusted mode, copy all under /tcb directory to the other node. You may want to prepare two copies of this. If not in trusted mode, just copy /etc/passwd file to the other node.

Copying Printers.

1. As a root, start SAM.

Goto options Printers and Plotters
Lp spooler
save/restore spooler configuration

Save it. This saves the configuration in /var/sam/lp directory.
Transfer this directory to other node(in /var/sam/lp directory).
From other node, go SAM-printer options as mentioned above and do recover. All printers should be accessible from other node.

I hope your florida troubles goes away early.

Anil
There is no substitute to HARDWORK
Sundar_7
Honored Contributor

Re: copy users and printers

You need to copy only the users and printers or need to clone the entire system.

You can download a product called "Ignite-UX" from software.hp.com and create a system recovery tape which can be used to clone the system.

If you are looking to copy only users and printers then you can try something like this

To copy users

- Depends on if your system is trusted or untrusted

If trusted ,copy /etc/passwd, /etc/group files and /tcb directory to the target system

If the system is not trusted, copy only /etc/passwd and /etc/group to the target system

To copy printers

On source system

# /usr/sam/lbin/lpmgr -S -x savedir=/tmp/lp

Copy /tmp/lp to the target system

# /usr/sam/lbin/lpmgr -R -x savedir=/tmp/lp

-- Sundar
Learn What to do ,How to do and more importantly When to do ?
Sanjay_6
Honored Contributor

Re: copy users and printers

Hi Jeff,

If the box is trusted, you can copy the passwd file entry and the tcb database entry for all the users from one box to another.

If the box is not a trusted one, you just have to copy the passwd file entry from one box to another.

the tcb entry for the userid on a trusted box is at localtion /tcb/files/auth/x/xuser
Here "x" is the first character in the user_name and the name of the user is xuser. The entry under /tcb/files/auth/x is a file and needs to be copied from one box to another for each user on a trusted box.

For printer, you can export the printer info using sam and then import it on the new system. Remember the export and import of printer database only works for network and remote printers and does not work for the locally connected printers for which the device file /dev/lp0 may change from one box to another.

Hope this helps.

Regds

Jeff Hagstrom
Regular Advisor

Re: copy users and printers

How do I know if the machine is trusted or not trusted? And what does that mean?
Geoff Wild
Honored Contributor

Re: copy users and printers

Trusted System:

When you convert to a Trusted System, the conversion program:
Creates a new, protected password database in /tcb/files/auth/.


Moves encrypted passwords from the /etc/passwd file to the protected password database and replaces the password field in /etc/passwd with an asterisk (*).


Forces all users to use passwords.


Creates an audit ID number for each user.


Turns on the audit flag for all existing users.


Converts the at, batch and crontab input files to use the submitter's audit ID.


Starting with HP-UX 11.0, changes the default value for umask to 077 (-rw-------, drwx------); see umask(1) .

See the following for more info:

http://docs.hp.com/hpux/onlinedocs/5187-2216/5187-2216.html


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Rick Garland
Honored Contributor

Re: copy users and printers

Copying the user accounts may include copying the home directories for the user accts as well. But this could be as simple as tar'ring up the /home and untar onto the new system.
Geoff Wild
Honored Contributor

Re: copy users and printers

BTW - for printers, see this post:

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=680773

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.