Printer Sharing: Suse/openSUSE 10.x 11.x IPP Print Server for Linux & Windows Clients
Simply put: it's about printing to a Linux computer from either a Linux computer or a Windows computer using the Internet Printing Protocol, IPP
Versions: Suse / openSUSE 10.0, 10.1, 10.2, 10,3, 11.0, 11.1
In this tutorial you share a printer on a Linux host as a print server for both Windows and Linux clients using the Internet Printing Protocol (IPP). An alternative protocol, netBIOS over TCPIP (NBT or Samba) is covered in a separate Tutorial: Linux Samba Printer Sharing. I think that sharing a printer by IPP is easier than sharing by Samba. The reverse scenario where you share a printer on a Windows host as a print server for Linux clients is covered in a third Tutorial: Windows Printer Sharing. This HowTo assumes CUPS is used for printing. Also note that IPP printing is independent of Samba. Samba does not need to be running.
Fixed IP address or DHCP Addressing? Your print server can have either a fixed or a dynamic (DHCP) IP address. Dynamic addresses are the Suse do-nothing default. Fixed addressing is the Administrator's choice for Linux servers because it's easier to administer. Tip: there's a reason why fixed IP addressing is widely recommended for servers. Here's a tutorial on configuring addressing both ways: HowTo Configure a NIC in Suse/openSUSE.
Discover Information about the Server: Regardless of which form of IP addressing you use, you'll need the IP address of the Server for testing TCPIP communications with clients. Issue this command in a terminal as root to get the address: ifconfig. I will use this address for the Server for demonstration purposes here: 192.168.2.2 and for the hostname I'll use "suseserver".
Next we need some information about the printer on the server. I've assumed that one has been installed either using Yast or CUPS GUI or other KDE/Gnome methods. The printer name for network purposes is available in the CUPS admin GUI at http://localhost:631/printers (if you're running Linux, click link to see). In my example I have installed a Hewlett Packard LaserJet 1020 printer named "laserjet1020". [View this Pic] Whatever name you find on your Server, it cannot have spaces. Record laserjet1020 exactly for later use. That name is the queuename. Now that you have the server's IP and the printers network name, move on and configure the Server for IPP printing.
Firewall and Ports: You have your network card in the "external" zone of SuSEfirewall2 (note that if it's in the "internal" zone, you're wide open). SuSEfirewall2 blocks the printing port by default, port 631, so either open that port or turn the firewall off temporarily. You can open Port 631 in Yast --> Firewall --> Allowed Services --> Services to Allow --> Cups.
Authority to change CUPS: When you attempt to make changes in the CUPS admin GUI (which is at http://localhost:631 -- click to see) you'll need a username/password pair. For openSUSE 11.0 & 11.1 supply the credentials for the Linux root user. In Suse Linux 10.x and openSUSE 10.x, the process changed over time from this command in a console: sudo lppasswd -a username to this command in a console: sudo lppasswd -g sys -a root.
Starting CUPS: Make sure CUPS is set to always start on booting: GoTo Yast --> System ---> System Services (Runlevels) --> Expert Mode --> cups = yes + runlevels 2, 3 and 5 --> Finish. Also, when you make changes to the CUPS configuration file you need to restart cups with this root shell command: rccups restart.
Setup the CUPS configuration file on the Server: The cups configuration file is the text file "cupsd.conf", located at /etc/cups/cupsd.conf. You can open a root-owned text file like cupsd.conf with either of these commands in a terminal window:
File cupsd.conf is grouped into segments. Locate the segment for each of the three areas below and edit it until it is in the required modified form as displayed below:
1: Advertise printers on local network
2: Allow LAN printing to the Linux server
Notice how the local LAN is allowed as 192.168.2.*. Be sure to chage that to match your situation. If you want to allow all subnets, then uncomment the line #Allow From @LOCAL.
3a: Allow CUPS to "Listen" for IPP printing. Use this for Suse 10.0 and 10.1. Simply check that this line is not commented out:
3b: Allow CUPS to "Listen" for IPP printing. Use this for openSUSE 10.2, 10.3, 11.0, 11.1. Listening on port 631 is closed in releases 10.2 through 11.1 by these lines:
Comment them out, change the paragraph title and open port 631 as follows:
Here's an alternative to the configuration immediately above, (only for openSUSE 10.2 onwards). Advanced users only: if you have a server with a fixed IP address you MAY (you don't have to - you just may) you may use this alternative to the Port 631 method. The advantage is increased security:
I have attached copies of the files cupsd.conf that I used to test working servers on Suse 10.0 & 10.1 and openSUSE 10.2 & 10.3 and also 11.0 & 11.1. You can compare these with yours.
Check mime types
Check the file /etc/cups/mime.convs and make sure the line containing the following term is uncommented
Check the file /etc/cups/mime.types and make sure the line containing the following term is uncommented
If either of these is left undone, you might receive errors like the following:
The work on the server is finished. Now you can configure clients to print to the server.
Check communications between Clients and Server: Do this the same for each Linux and Windows client. Open a terminal or DOS prompt and ping the Server with ping 192.168.2.2. A positive response there is a must before proceeding. Next enter this address in the web browser of the client and look at the installed printer on the server: http://192.168.2.2:631/printers/. Here's a screenshot of what you should see. When you establish these adequate communications you can proceed to configure the client.
Setting up a Linux client for IPP using the CUPS Admin GUI
You should now be printing Linux_to_Linux using IPP/Cups
Setting up a Windows (e.g. XP) client for IPP using the "Printers & Faxes" GUI
You should now be printing Windows_to_Linux using IPP/Cups.
Credits: This tutorial was stimulated by advice given by broch, Jop, winxp_escapee and oldcpu on the Suse Linux Support Forum.
I Hope this Tutorial makes life a bit easier for you.
Swerdna: 08 Jan 07; last revised 01 Jan 09