# CUPS listening when Printersharing is off



## tsaar (Sep 18, 2002)

I have printersharing off. 
Yet 
'sudo lsof -i' 
returns (among other things): 
cupsd 322 root TCP localhost:ipp (LISTEN) 
cupsd 322 root UDP *:ipp 

So: cupsd is listening on the ipp-port (that's 631) 
sure enough, I can connect : 
http://127.0.0.1:631 
But only from my own machine....(which eases my mind a little) 

Questions: 

- Why is cupsd listening even if I have printersharing off ? 
- How/Where is it controlled that only localhost can connect? 
(It's not my firewall, can't find cupsd in xinetd or inetd.conf) 

Thanks ! 

Maarten


----------



## davidbrit2 (Sep 18, 2002)

Since cups is running its own little http server, I would assume that it's taking care of the address restrictions itself. It can likely be configured by editing the appropriate file, but I sure haven't been able to find it yet.

And cups is used for printing with UNIX applications, right? It might not be related to printer sharing, so that could be why it stays on. I wouldn't mind finding a way to turn it off, though...


----------



## rharder (Sep 19, 2002)

It's _possible_ that the explanation is this: CUPS always listens to port 631. When Printer Sharing is off, it only listens to the local computer for a command to turn print sharing on. Then it listens to everything.

-Rob


----------



## BSDimwit (Sep 19, 2002)

much like lpd is... it gets started at bootup and runs and runs etc.  Not only is cups used for printer sharing, in 10.2 it also allows someone to print from your mac to 1) another machine's printer via IPP or lpd protocals 2) a locally installed but unsupported by apple or hp etc printer.

From what I have gathered it seems that if you have a printer that was previously supported by apple, or hp, or lexmark, then you don't necessarily go through the cups daemon to get something printed.  However, if your printer was not supported previously(like mine... non postscript installed on a remote windows box) cups now becomes your print server, albeit a locally installed one that will run your printjob through all the appropriate ghostscript filters to turn your ps job into one that is suited for a non ps deskjet or laserjet.

there is a cupsd.conf file that can be edited to allow, disallow, require password...etc and its setup much the same way that the apache.conf file is.  I can't be sure but I think its located at 

/usr/libexec/cups  but don't quote me on that...

will get you were you need to go...



> find / -name cupsd.conf -print



Anyhow... if you want to disable cups completely... edit /etc/hostconfig and find the enable_cups line and turn it off.


----------



## Koelling (Sep 19, 2002)

I just figured out how to print from OpenOffice.org and it was through this very method. It seems my print command wasn't loud enough to wake up the printer but I was able to start the job by going to 127.0.0.631. I'm all for keeping it active!


----------

