how can I configure cups to be used from network machines with windows?

5,222

You also have to make sure that you add the Listen :<port> to your cups configuration file /etc/cups/cups.conf.

/etc/cups/cups.conf

# Our private connection we listen to 
Listen *:12345
# The port number her just an example
# Substitute it with one you wish to use.

# Allow machines on local network to use printers
<Location /printers>
  Order allow,deny
  Allow 192.168.0.*
  Allow 192.168.1.*
</Location>

If this is what your configuration already looks like then awesome. Once you've saved /etc/cups/cups.conf make sure to restart the cups server to apply the changes. If your system is using systemd as its init this can be done with systemctl restart cups.service. If it's using sysvinit then /etc/init.d/cups restart would be used.

Once this is setup go to each windows machine and install a network printer and use the following scheme to identify the printer.

http://<cups_server_hostname>:12345/printers/<printer_name>

When asked what driver that you would like to use. Select the Generic category and use the one labeled MS Publisher Color Printer. Finish the installation of the network printer, test.

Share:
5,222

Related videos on Youtube

jpganz18
Author by

jpganz18

Updated on September 18, 2022

Comments

  • jpganz18
    jpganz18 almost 2 years

    I've been fighting with CUPS since many hours (too many) and I still cannot figure out what's wrong. I installed a printer on a Debian Machine, when I add a printer I have two options "Local printers" and appear the printer that is connected (the one I want to use to print from my network) and "Other network printers", so, I thought maybe I should add local printer and I chose my printer and I installed and all. It prints the tests and all, so, from Windows I added my printer with the url http://192.168.1.2/printers/myprinter but it doesn't work. I read more and I find out the IPP protocol, some use it but some use AppSocket/HP JetDirect. I am very confused; which is the way I should add this printer? Do I have to add a printer in the section of network printers?

    I installed samba and I added this

    <Location /printers>
      Order allow,deny
      Allow 192.168.0.*
      Allow 192.168.1.*
    </Location>
    

    When I add printers on Windows it asks for 3 options, first search (shows me computers on network, I can't choose the machine with Debian, it asks me to login. I don't know which user, it's not Debian's OS, nor Windows), second it's "selected shared printer", but I can not enter ipp:// , it only accepts http:// , and third one is printer through TPC/IP, there I can add http:// ipp:// or socket:// but none of them are successful.

    • jordanm
      jordanm over 11 years
      If you are printing to a CUPS server, it will be the ipp:// protocol. Port 631 by default.
    • jpganz18
      jpganz18 over 11 years
      thank you, I tried but it cant be recognized...