Printer Sharing: Suse/openSUSE 10.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
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. In 10.0 and 10.1 you add a user by entering this command in a terminal: sudo lppasswd -a username. You supply the root password first up, then a password for the user named "username" when asked. In 10.2 and 10.3 you may use root's username/password pair if you wish. If you need to add root to the CUPS authorised users in 10.2/10.3 (test without first) initiate the dialogue this way: 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.*. 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 and 10.3. OpenSUSE 10.2 and 10.3 have a different arrangement. They do not have listening on port 631 enabled. The line Port 631 has been removed. Instead this group of lines that is not present in Suse 10.0/10.1 has been added into 10.2/10.3:
Find those lines in 10.2, 10.3 and comment them out. Also add this line Port 631. The end result is as follows and it essentially takes cupsd.conf for 10.2/10.3 back to the configuration for 10.0/10.1:
Here's an alternative to the configuration immediately above, once again for 10.2/10.3. 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 which you can compare against yours.
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/laserjet1020. 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 others on the Suse Linux Support Forum, particularly in these threads: Forum topic=48663, Forum topic=41382 and Forum topic=47213
And from a very learning experience in discussion with oldcpu.
I Hope this Tutorial makes life a bit easier for you.
Swerdna: 08 Jam 07; revised 28 October 07