Copy Printer configuration from on server to another

On server “A”

1.Open “sam ->Printers and Plotters->LP Spooler-> Save/Restore Spooler Configuration”
2.Go to “Actions”
3.Click on ‘Save Spooler Configuration’
4.Exit out of SAM
5.tar cvf /tmp/sam.tar /var/sam/lp
6.Transfer the sam.tar file to system B:/tmp.

On server “B”

1.tar xvf /tmp/sam.tar
2.You may need to change the permissions and ownership of these files. To do that run:
chmod -R 755 /var/sam/lp/* ; chown -R lp:bin /var/sam/lp/*
3.Open “sam ->Printers and Plotters->LP Spooler-> Save/Restore Spooler Configuration”
4.Go to “Actions”
5.Click on ‘Restore Spooler Configuration’
6.Don’t forget to restart the scheduler
7.Exit out of SAM


Manpage–How-to build the whatis file on HP-UX

Run "catman" to build the "/usr/share/lib/whatis" file. Then you can run the "man –k [some command] to see what manual sections the command is in.

For example, if you run "man -k mkdir", it will show that "mkdir" is in sections 1 and 2.

To see section 2 you would run "man 2 mkdir".

Recover HP-UX root password

If you lost the root password on system running HP-UX, perform the following steps:

Ask all other users to log off the workstation.
Type the command sync four times to clear the buffer cache.
If you have installed sudo, or if you have enabled a user other than root to reboot the machine, reboot your workstation.
If you can not reboot the machine, press the reset button to force a reboot. Don’t press the reset button unless you can’t get the machine to reboot any other way.
During the reboot, press the ESC key to interrupt the reboot.
This will bring you to the BOOT_ADMIN prompt. From here, boot to the ISL with the command boot scsi.X.0 isl where scsi.X.0 is the SCSI address of your internal disk drive. (To find that address, use the path command at the BOOT_ADMIN prompt.)
Now you are at the ISL prompt. Boot up into single user mode with the command hpux -is (or if you are still running 9.X use the command hpux -is boot disk(scsi.X;0)/hp-ux, where again scsi.X.0 is the SCSI address of your internal disk drive.)
After the machine has come up in single user mode, you can try to set the root password by running the passwd command. If the program will run, you can enter the new password now. Reboot again (command reboot) and you are done.
If the passwd program will not run in the single user mode, manually edit the /etc/passwd file (be careful!) and take out the root password (second field), leaving the 2 colons side by side.
Now, quickly reboot the machine (reboot) and log in as root. No password is required. Immediately run the passwd command and set a password for root.
It’s important to minimize the time between removing the root password from the /etc/passwd file and resetting the password with the passwd command.
During this time, your system is wide open.

Increase swap space in HP-UX

  1. By using SAM
    SAM > Disk and File Systems > Swap > Actions
    You can add the Device Swap or File System Swap.
  2. By Command Line
    Create the logical volume for your secondary swap:
    # lvcreate -L 128 /dev/vg14

    NOTE: “-L 128” is the size of desired swap

    Verify the logical volume:
    # lvdisplay /dev/vg14/lvol15

    Use SAM to declare your new secondary swap or use the command line:
    # swapon /dev/vg14/lvol15

    Verify it has been added in “/etc/fstab” when using SAM, or add it manuallywhen using the command line.

    /dev/vg14/lvol15 . swap defaults 0 0