- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to change printer's name
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
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
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-28-2005 02:25 AM
тАО07-28-2005 02:25 AM
How to change printer's name
I need to change 100 printer's names in one HP-UX 11i. Only the name, not ip. Is there any way to do this, without do remove and add with hppi?. I would like to make an script.
Thanks a lot of!
Carmen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 02:36 AM
тАО07-28-2005 02:36 AM
Re: How to change printer's name
for PRNTR in `cat /tmp/printerlist`
do
removequeue -f -q $PRNTR
addqueue -h $IP -q $PRNTR -b off
done
You can use lpstat to create your list of printers.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 02:40 AM
тАО07-28-2005 02:40 AM
Re: How to change printer's name
for PRNTR in `cat /tmp/printer_list`
do
case $PRNTR in
crlzr2_nf) IP=130.1.1.74
;;
crlzr3_nf) IP=130.1.1.72
;;
registry2) IP=130.1.7.73
;;
*) OPRNTR=$PRNTR
esac
Expand as needed for all your printers.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 02:43 AM
тАО07-28-2005 02:43 AM
Re: How to change printer's name
Starting at /etc/lp and going down to /var/spool/lp and going down.
It is almost easier to remove and add using a script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 02:58 AM
тАО07-28-2005 02:58 AM
Re: How to change printer's name
Are you changing the queue names or simply changing the hostname?
Did you hardcode the IP address or did you use hostnames?
Before making any suggestions, these data should be known.
At the very least, you should backup your current configuarion before doing anything so that you can get yourself out of trouble almost as easily as you got yourself in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 03:05 AM
тАО07-28-2005 03:05 AM
Re: How to change printer's name
I only want to change the hostname, and we use hostnames.
Is there any way to change only this, maybe one command??
Thanks very much.
Carmen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 03:10 AM
тАО07-28-2005 03:10 AM
Re: How to change printer's name
You donot have to modify the lp config yet you have the printers known as the new name as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 03:46 AM
тАО07-28-2005 03:46 AM
Re: How to change printer's name
As Rick said, you can modify/add entries on /etc/hosts file with printers IP addresses, their old names and new ones.
Regards,
Carles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2005 04:01 AM
тАО07-28-2005 04:01 AM
Re: How to change printer's name
a line:
queuename newhostname
for each printer:
Then read each line and in the file
/var/spool/interface/${queuename} look for the line "PERIPH=xxxxx" and replace it with the line "PERIPH=${newhostname}"
This would be easy using Perl, awk, or sed.