Operating System - HP-UX
1753404 Members
6916 Online
108793 Solutions
New Discussion юеВ

Cannot add or delete a given printer

 
SOLVED
Go to solution
Reinhardt
Occasional Advisor

Cannot add or delete a given printer

I have a couple of printers that are giving me problems.

If I try to delete them (with sam or removequeue), it says that they don't exist and if I try to add them (using sam or addqueue) it says that the already exist.

I've tried deleting some these printers' files from the various directories inside /etc/lp, but no luck.

Is there a way to manually wipe out all traces of a printer so I can add it again from scratch?

Thanks.
12 REPLIES 12
OldSchool
Honored Contributor

Re: Cannot add or delete a given printer

did you also remove the request directory?

/var/spool/lp/request/
OldSchool
Honored Contributor

Re: Cannot add or delete a given printer

also, did you do and lpshut & lpsched after removal?
Reinhardt
Occasional Advisor

Re: Cannot add or delete a given printer

Thanks. That got me halfway there.

I should have mentioned it in the original post, but one of the problem printers was a laserjet and the other was a remote printer (Oce/Canon).

Removing the request directory removed all traces of the laserjet and I was able to re-add it successfully.

But it didn't help in removing the remote printer (it's an Oce/Canon). I confirmed that I removed the file from all directories under /etc/lp and /var/spool/lp/request, but it still shows up in sam, but doesn't let me delete it or re-add it.
Court Campbell
Honored Contributor

Re: Cannot add or delete a given printer

I have a feeling Bill Hassell can answer this.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: Cannot add or delete a given printer

my best guess is that the printer is still referenced in /var/spool/lp/pstatus. It's a binary file. try usings strings on the file and see what you get.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Reinhardt
Occasional Advisor

Re: Cannot add or delete a given printer

It's in /var/spool/lp/pstatus 3 times, twice by itself and once with our domain name.

OldSchool
Honored Contributor

Re: Cannot add or delete a given printer

an admitted long-shot, but try

find . -name "**"

from both /var/spool/lp and /etc/lp

Reinhardt
Occasional Advisor

Re: Cannot add or delete a given printer

Unfortunately, nothing was found with the find command. I'm assuming at this point that it has something to do with the pstat file.

Court Campbell
Honored Contributor

Re: Cannot add or delete a given printer

what happens if you try

# lpadmin -x
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"