Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Is there a firewall blocking that port on the machine? If you don't know how to tell, post the output of iptables -nvL. – Gilles Sep 2 '11 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 '11 at 22:16
up vote 1 down vote accepted

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.

share|improve this answer

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
share|improve this answer
I did, but still can't see port 515. – user1024 Sep 6 '11 at 15:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.