Operating System - HP-UX
1834814 Members
2629 Online
110070 Solutions
New Discussion

lp default dest - remove! remove!

 
SOLVED
Go to solution
jerry1
Super Advisor

lp default dest - remove! remove!

I have cleaned out all the bogus decrepit
misconfigured and malformed printer queues
off of one of my server. But, lpstat still
thinks the default printer is still there.
How do I get rid of the default queue
definition? Where is it configured?
The queue is gone but lpstat and sam think
it's still there.

All traces of queues in /etc/lp /var are gone.
Also in /var/sam .

12 REPLIES 12
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: lp default dest - remove! remove!

You are making this too hard. lpadmin -d (no more args) will do the trick.
If it ain't broke, I can fix that.
jerry1
Super Advisor

Re: lp default dest - remove! remove!

Nope! It's still there when I do an lpstat
and if you try to add it with sam it won't
let you.
A. Clay Stephenson
Acclaimed Contributor

Re: lp default dest - remove! remove!

I just tried an lpadmin -d and the action was no system default printer. This is exactly the result documented in the lpadmin man page. When you say you "cleaned out" the print queues, I assume that means you did an lpadmin -x command and not simply a rm of files.
If it ain't broke, I can fix that.
jerry1
Super Advisor

Re: lp default dest - remove! remove!

Correct.

cd /etc/lp/interface
lpshut
for i in `ls`;do
lpadmin -x$i
done

A. Clay Stephenson
Acclaimed Contributor

Re: lp default dest - remove! remove!

Okay, then let's try the brute force approach. Cat /var/spool/lp/default. That file should be owned by lp:lp with mode set to 644.
If it ain't broke, I can fix that.
jerry1
Super Advisor

Re: lp default dest - remove! remove!


I added the queue back and another and
tried to switch default destination.

I can see /var/spool/lp/default being
modified with the new entry but lpstat -t
still shows the old queue name.

Running lpadmin -d with the existenece of
the queue now still does not disable
default destination. Even when default file is empty lpstat still reports queue name as deafult dest. Where is lpstat getting its info for the queue name other than default file???

Running truss against lpstat and lpadmin
did not give much results.

I have tried to remove the queue also with
sam but it does not remove the default destination even though it says it is.???




Fabio Ettore
Honored Contributor

Re: lp default dest - remove! remove!

Hi Jerry,

just try to rename default printer by replacing it:

# lpadmin -d

After this another default printer should be configured.
Anyway another time I suggest you to remove a printer by

# lpadmin -x

Maybe something in your script didn't work fine and now you get problems.

HTH.

Best regards,
Ettore
WISH? IMPROVEMENT!
jerry1
Super Advisor

Re: lp default dest - remove! remove!

It's not a script. These are just command
line commands like you would type manually.
Jeff Schussele
Honored Contributor

Re: lp default dest - remove! remove!

Hi Jerry,

Couple of things:

1) Make sure that /etc/profile, nor user's .profiles have LPDEST set

2) Check /var/spool/lp/pstatus & qstatus do not contain this printer - be advised that they are not ascii text files.

Lastly, if you don't have any other printers, you could remove the LP fileset & reinstall it. That should essentially wipe the slate clean.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
KapilRaj
Honored Contributor

Re: lp default dest - remove! remove!

I have deleted the printer names from /etc/lp/members manually once or twise in my carreer.. You couild try this

Kaps
Nothing is impossible
jerry1
Super Advisor

Re: lp default dest - remove! remove!

That's it. LPDEST set in roots .profile.
If I change LPDEST, it changes the output from lpstat. What a waist of time. ARRRGHH!

Thanks Jeff.
Jeff Schussele
Honored Contributor

Re: lp default dest - remove! remove!

Anytime, Jerry, anytime.
Sometimes it's the simple things...

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!