How to enable cups-lpd / port 515?

26,895

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:
26,895

Related videos on Youtube

user1024
Author by

user1024

Updated on September 18, 2022

Comments

  • user1024
    user1024 over 1 year

    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
    PORT     STATE SERVICE
    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?

    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' over 12 years
      Is there a firewall blocking that port on the machine? If you don't know how to tell, post the output of iptables -nvL.
    • user1024
      user1024 over 12 years
      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
    user1024 over 12 years
    I did, but still can't see port 515.