Operating System - HP-UX
1821190 Members
3357 Online
109631 Solutions
New Discussion юеВ

Re: Unable to remove printer

 
SOLVED
Go to solution
Nick Brennan
Occasional Advisor

Unable to remove printer

Hi all.

I've tried to add a network printer from the command line using lpadmin. I set the model incorrectly, and now want to delete the printer to readd it. I cannot delete the printer using - I get the error "destination non-existent". The relevant files exist in /etc/lp/interface etc, queue exists in /var/spool/lp, if I run an it lists the destination as "not accepting requests". I have tried deleting the printer using sam and get the same error.

Have checked in /var/spool/lp and the printer files exist there also. However the printer is not listed if I run a strings on /var/spool/lp/pstatus or ~qstatus.

How can I delete the printer?

Yeeee - Haaaaaaaaaa!
8 REPLIES 8
S.K. Chan
Honored Contributor
Solution

Re: Unable to remove printer

I suspect the printer was not created correctly, hence some printer config file does not get updated/created. You said the file exist, did you check it completely. For exmample :-
1) /usr/spool/lp/interface/
2) The dir /usr/spool/lp/request/
3) /usr/spool/lp/member/
If they don't simply create a "dummy" file by using touch and try lpadmin -x it again.
Alex Glennie
Honored Contributor

Re: Unable to remove printer

First shutdown the spooler:

lpshut

Change to the /etc/lp/member directory and do a:

touch ID

Then do a:

chown lp ID

Change to the ../interface directory and do a:

touch ID

Then do a:

chown lp ID

Change to to /var/spool/lp/request directory and do a:

mkdir ID

Then do a:

chown lp ID

Next execute:

lpadmin -xID

Restart the spooler with a:

lpsched

Armin Feller
Honored Contributor

Re: Unable to remove printer

Hi,

please recreate the missing subdirectory /usr/spool/lp/request/ Then the remove should work.

Or try by setting following files to:

# >/var/spool/lp/qstatus
# >/var/spool/lp/pstatus
# >/var/spool/lp/default,


Regards,
Armin
MANOJ SRIVASTAVA
Honored Contributor

Re: Unable to remove printer

Hi Nick


There are some remanants of the printer name existing under /etc/lp directory , incase you cannot delete it , you may try to reinstall it using the same name and then deldeting it ,


lpshut
lpadmin -p< old printer name > -v /dev/null -m rawlp
accept pritner name
enable printer name
and then lpadmin -x printer name


this will recretate the ques properly so taht u can delete it


Manoj Srivastava
Nick Brennan
Occasional Advisor

Re: Unable to remove printer

All - thanks for your swift help!

I stopped the spooler, checked files existed under /etc/lp* and /var/spool/lp/*, and added the queue directory to /var/spool/lp/request, which was missing.Tried running .

This errors with "lpadmin: can't remove printer", yet deletes the "ID" directory from /var/spool/lp/request. It doesn't delete any of the other files though. I've checked perms on all "ID" printer files, which are set to lp:lp, 755 on directories and 644 on files.
Yeeee - Haaaaaaaaaa!
Nick Brennan
Occasional Advisor

Re: Unable to remove printer

Manoj - just tried running this - I then get "lpadmin: cannot open member file". The member file exists in /etc/lp/member.
Yeeee - Haaaaaaaaaa!
Alex Glennie
Honored Contributor

Re: Unable to remove printer

Nick can you access from the ITRC knowledge base doc id : UPRTKBAN00000857 2Script to verify and check lp spooler printer configuration" .... it looks like it may be of use here .... ?

Nick Brennan
Occasional Advisor

Re: Unable to remove printer

Looks like the permissions in /etc/lp parent directories were all screwed up. I've changed these and the printers can be deleted. Doh.......

Thanks for your help.

;-)
Yeeee - Haaaaaaaaaa!