Operating System - HP-UX
1825596 Members
3404 Online
109682 Solutions
New Discussion

remove a printer - won't go away

 
SOLVED
Go to solution
Rick Garland
Honored Contributor

remove a printer - won't go away

Hi all:

Went through to remove a printer from an HPUX 11.00 system
lpshut;lpadmin -x;lpsched

The first time the response was the printer was removed. Now I am trying to add a remote printer with the same name. In doing so the system responds that a printer with this name already exists. Did a search for the printer name and found 3 instances:
/var/sam/lp/member/
/var/sam/lp/interface/
/var/sam/lp/interface/model.orig/

I removed these files, lpshut, lpsched, no instance of the printer on the system - in lpstat or a search.

Tried to add the remote printer again and the system is telling me it still exists.

What is going on?

Many thanks!
10 REPLIES 10
Robert-Jan Goossens
Honored Contributor

Re: remove a printer - won't go away

Hi,

Try

# lpadmin -x printername

Robert-Jan.
John Poff
Honored Contributor

Re: remove a printer - won't go away

Hi,

Here is a thought. Maybe your old printer is still in one of the lp status files in /var/spool/lp [outputq, pstatus, qstatus]. Take a look in there and see if you see it. If so, you might try putting back the files you removed and then try removing it again. Maybe there was a permissions or ownership problem on one of those files?

JP
Uday_S_Ankolekar
Honored Contributor

Re: remove a printer - won't go away

Does same old name exists in DNS database??

Just a thought.

-USA..
Good Luck..
Sachin Patel
Honored Contributor

Re: remove a printer - won't go away

If you are using jetadmin then use jetadmin to remove printer.

Check /var/spool/lp/, /var/adm/lp, /etc/lp/member

and remove any entry of that printer. most probable it will go away.

Sachin
Is photography a hobby or another way to spend $
Mark Greene_1
Honored Contributor

Re: remove a printer - won't go away

It looks like the printer was created via sam. It also looks like lpadmin doesn't know about the sam pieces of the config. Have you tried deleting the printer via sam? Of course, it may not work because too many of the other files are gone. Will sam let you create it again, and then remove it?

At the very least, you can run from the root dir:

find / -name "*printername* -print |xargs -i rm []

and then see what sam lets you do.

HTH
mark
the future will be a lot like now, only later
Robert-Jan Goossens
Honored Contributor

Re: remove a printer - won't go away

Hi sorry about my previous post,

Try thisn one

# sam

Printers & Plotters
LP Spooler

Save Spooler Configuration

Restore Spooler Configuration

sam will try to restore any faults,

after this remove the printer with lpadmin -x

Hope it helps,

Robert-Jan.
Uday_S_Ankolekar
Honored Contributor
Solution

Re: remove a printer - won't go away

Also check if you have dierctory /var/opt/pd/pdclientd
then have a look at the following doc..


http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000066028328

-USA..
Good Luck..
Rick Garland
Honored Contributor

Re: remove a printer - won't go away

Still no luck.

There is no DNS in play, I have searched the entire system for the printer - nothing shows up, SAM invokes the jetadmin app, jetadmin removal does not find it.

I will keep hacking away. Many thanks for the feedback and keep those ideas coming!
A. Clay Stephenson
Acclaimed Contributor

Re: remove a printer - won't go away

Hi Rick:

This is similar to a response I did today.

I. SAM -> Printers and Plotters -> LP Spooler -> Save / Restore Spooler Configuration -> Actions -> Save Spooler Configuration

2. Exit SAM

C. cd /var/sam/lp
edit the file, lpinfo, and make any changes to the remote printer lines that you like and save the file.

IV. SAM -> Printers and Plotters -> LP Spooler -> Save / Restore Spooler Configuration -> Actions -> Restore Spooler Configuration

----------------------------

The actual lp data is stored in /var/spool/lp/pstatus but it's a binary file so that editing would require C or Perl.

============================

I suspect that your problem is pstatus. I would look for your entry in the lpinfo file above and also look through all the directories under /var/sam/lp for any references to your printer and delete them before restoring the configuration.

I don't know if this will work but you might also try nulling the pstatus file in /var/sam/lp.

As a test, do a strings /var/spool/lp/pstatus | grep "yourprinter" to see any references there.

May the force be with you, Clay



If it ain't broke, I can fix that.
Rick Garland
Honored Contributor

Re: remove a printer - won't go away

Hey Uday:

Congratulations - you are the lucky winner of 10 (count em) points!

The you directed me to has the info I needed. I was able to add the remote printer with no problems.

I modified the lpmgr file as directed. Worked like a champ!

Many thanks to all!