I have a print server using CUPS on a CentOS 5.3 box. On my PC, I set up a remote printer with the URI http://$PRINT_SERVER:631/printers/$PRINTER_NAME, and have successfully been able to print files to it.

There is another system, which my team does not have control over, that sends all of its print requests using LPD on port 515. I need to handle this somehow. I installed the cups-lpd package and edited the /etc/xinetd.d/cups-lpd file to enable it (or so I thought):

~$ cat /etc/xinetd.d/cups-lpd
service printer
        socket_type = stream
        protocol = tcp
        port = 515
        wait = no
        user = lp
        group = sys
        passenv =
        server = /usr/libexec/cups/daemon/cups-lpd
        server_args = -o document-format=application/octet-stream
        disable = no

But as far as the other computers on the network are concerned, port 515 is closed:

Starting Nmap 5.51 ( http://nmap.org ) at 2011-09-02 16:41 Central Daylight Time

Nmap scan report for [IP address]
Host is up (0.028s latency).
Not shown: 995 closed ports
514/tcp  open  shell
631/tcp  open  ipp
1066/tcp open  fpo-fns
1067/tcp open  instl_boots
6000/tcp open  X11

Nmap done: 1 IP address (1 host up) scanned in 0.52 seconds

Is there something else I need to change in the xinetd configuration to enable the LPD port?

  • Is there a firewall blocking that port on the machine? If you don't know how to tell, post the output of iptables -nvL. Sep 2, 2011 at 22:13
  • Chain INPUT (policy ACCEPT 10 packets, 1071 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 5 packets, 1012 bytes) pkts bytes target prot opt in out source destination
    – user1024
    Sep 2, 2011 at 22:16

2 Answers 2


I ran xinetd with the -d (debug) flag, and got the following helpful error messages:

11/9/6@15:32:33: ERROR: 2767 {server_parser} Server /usr/libexec/cups/daemon/cups-lpd is not executable [file=/etc/xinetd.d/cups-lpd] [line=10]
11/9/6@15:32:33: ERROR: 2767 {identify_attribute} Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/cups-lpd] [line=10]
11/9/6@15:32:33: ERROR: 2767 {fix_server_argv} Must specify a server in printer

There was no /usr/libexec/cups/daemon/cups-lpd file, but there was a /usr/lib/cups/daemon/cups-lpd. That's what I get for copying sample code from the internet. Edited this line, and the printer is working now.


Did you restart the xinitd service on the computer you installed cups-lpd on after you finished editing the cups-lpd file?

/etc/rc.d/init.d/xinetd restart
  • I did, but still can't see port 515.
    – user1024
    Sep 6, 2011 at 15:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .