- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to define many printers automatically
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2001 11:38 PM
07-02-2001 11:38 PM
I have about 200 hundreds networks printers defined ( using jetadmin ) on a HP-UX system. How can i define them automatically on another HP-UX system without doing it by hand ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2001 11:52 PM
07-02-2001 11:52 PM
Re: how to define many printers automatically
Assuming a printer lp on a remote system system2, the command:
/usr/sbin/lpadmin -plp3 -v/dev/null -mrmodel -ocmrcmodel -osmrsmodel -ob3 -ormsystem2 -orplp -v/dev/null
causes the spool system to use the local line printer lp3 and the model rmodel. The spool system also uses the model rcmodel to cancel remote requests and rsmodel to get status from system2. In addition, the three-digit sequence numbers, the remote system name system2 and the remote printer lp are used.
So assuming, you create yourself an input file in the format:
local_printer_name remote_system remote_printer_name
you could go like (all in one line)
cat my_list_of_printers |
awk '{ print "/usr/sbin/lpadmin -p" $1 "-v/dev/null -mrmodel -ocmrcmodel -osmrsmodel -ob3 -orm" $2 " -orp" $3 " -v/dev/null" }' > create_them.sh
You could extend this, if you need to set parameters for the modelscripts as well.
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2001 11:57 PM
07-02-2001 11:57 PM
Re: how to define many printers automatically
to get the input list, you might start to
catch "lpstat -t" in a file, and use an editor which is column mode capable.
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2001 12:05 AM
07-03-2001 12:05 AM
Re: how to define many printers automatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2001 04:43 AM
07-03-2001 04:43 AM
Solution1. rcp /etc/host newmachine:/etc/hosts
2. tar cf - /etc/lp | remsh newmachine tar xvf -
3. tar cf - /var/spool/lp | remsh newmachine tar xvf -
I ran this on a system with 10 printers configured (8 jetadmin and 2 remote printers) and it replicated the entire printer setup without any problems or further intervention.
P.S You need to be careful with the rcp of the host file it may be safer to rcp to a temp file then vi /etc/passwd, :r /tmp/hosts (read /tmp/hosts within vi) then delete any unwanted enteries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2001 09:56 PM
07-03-2001 09:56 PM
Re: how to define many printers automatically
The "supported" to copy is to use SAM and
export from one machine tar /var/sam/lp(default and can be changed) and decendents, move the tar to the new machine, untar,
and import.
This works in HPUX10.20 and 11.00. I do not remember it in 9.04, and those are the OS I have used.