Print gateway based on CUPS for terminal server based on MS WS 2008 R2 and its clients based on MS Win 2k / XP with printers connected to them
It will be interesting for you to read this report if the picture of the development of your LAN fits the following description
New terminal server MS Windows Server 2008 R2 - to replace the old Windows Server 2003 R2
Client workstations on MS Windows 2000 or on MS Windows XP with printers connected to them, which can be accessed through the Microsoft network, operating normally both autonomously and when connected to them from other clients, or when connected to a terminal server based on Windows Server 2003 R2 through the Microsoft network
Printers are old, maybe not even HP, for which there is no driver for MS WS 2008 R2
Either the HP printer itself is supported by a universal driver, but the OS running on the client machine is MS Windows 2000, i.e. does not imply its installation
Either the printer is HP, and the client's OS is compatible with the universal driver, and the problem of its installation would solve the incompatibility problem with MS Windows Server 2008 R2, but one of the client machines has, for example, a virtual machine with an inherited system based on MS Windows OS 98, also using this printer, which also does not imply the installation of the HP Universal Printer Driver, since its implementation for win98 no
Obviously, not only you print to your printer, but also your neighbors in the office, i.e. redirect with remote desktop client is not considered here; and not always, as practice shows, works: both because of the incompatibility of drivers, and because of the lack of knowledge of the applicability of the nuances of such highly specialized technologies as EasyPrint
New clients appear on the network, based on Windows 7, which may not need access to the terminal server, but who will need to print over the network to such old printers.
It is assumed that even for such problem printers there are drivers in the CUPS system.
You, as the system administrator, are not afraid to use UNIX-like operating systems in everyday tasks, and have experience with them
Also, please agree that non-functional issues — for example, security issues — are not addressed here.
The practical need for this solution
Several copies of printers fell under some of the cases discussed in the preamble of the report. For example: one XEROX DocuPrint P8ex (client OS Windows XP) and two copies of HP LaserJet 1005 (one connected to a client computer based on Windows 2000, the other - based on Windows XP).
The route for the print job
Application program on a Windows 2008 R2 server or on a Windows 7 workstation; IPP client
GNU / Linux gateway with CUPS printing system and SAMBA client
Client workstation Win 2k / XP with a locally connected printer, which is accessible from the Microsoft network
')
Gateway idea
I came up with after familiarizing myself with [ 1 ] and searching for alternatives to installing GNU / Linux on client machines; probably, subconsciously, the emergence of such an architecture was influenced by familiarity with the three-tier architecture of access to the database [ 2 ] and the search for ways to use it as such, and its analogies. The very concept of a gateway does not quite fit into this context, but only by analogy: according to [3, p.313]
"The gateway is a relay system providing the interaction of two information networks."
It would be more accurate to call it a virtual print gateway or something else; further, for brevity, this link of the route will be called simply the gateway.
The most interesting is already stated, it's time to move on to the routine. The following is ...
Concept instructions for the deployment of the gateway
On the client machine with the address 192.168.ab there is a user prn_user with the password secret - for printing through the Microsoft network, the print subsystem is configured and works as it is in the Windows 2000 / XP / 2003 environment. We look at the name of the printer on the network: the context menu of the printer, the item “Properties”, the tab “Access”, the field “Share:” xerox . % computername% of this client: UHost01 - we will need it, for example, to generate a meaningful name in the CUPS system; although if it matches the DNS name inside the local zone, and your household has a good name resolution in IP addresses, and the search is inside the domain suffix of this zone, then it may be used as a substitute for the address 192.168.ab hereinafter.
Customize the print gateway
System-wide work with the CUPS server
The basic part of the gateway. Looks like that
Iron gateway: an old server system unit DELL PowerEdge 1400 2xCPU iP-III-800/1536 MB RAM / 18 GB HDD
OS: Debian GNU / Linux 6.0 i386
Gateway Address: 192.168.ac
Package installation If CUPS is not installed yet, give the command to install it.
# aptitude install cups ... 0 packages updated, 52 new ones installed, 0 packages marked for deletion, and 0 packages not updated. You need to get 26.7 MB archives. After unpacking 83.2 MB will be taken. Want to continue? [Y / n /?] Y ...
We look, whether CUPS is started
# /etc/init.d/cups status Status of Common Unix Printing System: cupsd is running.
As required, we go further. Also, the system requires the presence of the smbclient package, since The output to the network printer will be on the SMB protocol, and in this package there is a backend for CUPS.
You must make sure that CUPS is configured to accept tasks from outside We go to the admin panel, for example, like this: 192.168.ac:631/192.168.ac:631/ , click on the tab "Administration", then, in the section "Server" - "Server Settings:" it is necessary to check the "Allow sharing of printers connected to this system" and "Allow printing from the Internet "; if not, then click “Save”, after pressing which we will be asked for the username and password, by default this is the username / password from our Linux system root user account, i.e. as root
We connect the printer to CUPS
Tab "Administration" in the section "Printers", click the button "Add a printer"
In the section "Other network printers:", select the value of the "Windows Printer via SAMBA" radio button and click "Continue"
Section "Add a printer", In the "Connection:" field, enter the value " smb://prn_user:secret@192.168.ab/xerox " (hereinafter: enter the value without quotes) and click "Continue"
Fill in the next field in this way Name: drive in " Uhost01_xerox " - this will be the name of the printer in the CUPS system The following two fields are not so critical, their meanings should be invented by you for your own convenience: Description: " Xerox DocuPrint P8ex " Location: " 1 , 13, , .. " Connection: " smb://prn_user:secret@192.168.ab/xerox " (already inserted, displayed for reference) “Sharing:” - “Allow sharing of this printer” - tick here We press the button "Continue"
Choose a printer driver with the same name as ours; if not, then the closest one by name; This approach works in most cases. Create: "Xerox" - click "Continue" Model: choose "Xerox DocuPrint P8e Foomatic / hpijs-pcl5e (recommended) (black and white, duplex printing)", and at the bottom press the button "Add Printer"
We get to the page “Set default parameters for Uhost01_xerox ” - here there are various parameters of trays and paper size; I left everything as it was and clicked on “Save default settings”
For a few seconds, a window will appear saying that our printer uses the default settings.
We get to the page of the newly added printer and give the command “Maintenance - printing a test page”
If the test page is OK, then the printer is ready to work in CUPS, you can go further
We configure the MS WS 2008 R2 server or the client of Windows 7
Presetting
Turn on the Internet Printing Client
For the case of Windows 7 Checking: the components should include the Internet Printing client: Start - Control Panel - Programs and Components - in the window that appears, click on the caption on the left “Enable or Disable Windows Components” further on the tree: “Printing and Document Services” - “Internet Client print "- the last jackdaw should stand; if not, then set. Click "OK" to confirm the changes or "Cancel" if the changes are not made.
For the case of MS Windows Server 2008 R2 This component is disabled by default [ 4 , Tuesday, March 15, 2011 1:49 AM], and I had to tinker to understand why the addition of the printer described in Section 3.2 does not work. Start - Control Panel - Programs - Enable or Disable Windows Components In the window that appears, select the item “Components” on the left to find the button with the green plus sign “Add components” and in the list put a tick in front of “Client of Internet printing”, click “Next” “Install”.
If the component “Internet printing client” was turned off, and we turned it on, i.e. performed clause 3.1.1., then restart the print server after that, for which the command line:
> net stop spooler > net start spooler
Change the tincture on the proxy server All users of this printer should disable proxies in their browser properties, or set an exception, i.e. 192.168.ac or for its subnet as a whole, i.e. for 192.168.a.* .
Printer setup This item is also done with administrator rights; Initially, the printer will be available to all users.
Start - devices and printers
Printer installation (wizard window will appear)
For MS Windows Server 2008 R2 there will be an additional step in which we click on “Add a local or network printer as administrator.”
Add a network, wireless or bluetooth printer
Click "the desired printer is not in the list"
The radio button should be in the "Select a shared printer by name" position, next to it is the field where we drive in " 192.168.ac:631/printers/Uhost01_xerox192.168.ac:631/printers/Uhost01_xerox ", click" Next "
If you successfully contact the printer, the “Add Printer Wizard” will appear, if unsuccessful, an error message will appear. If the line above is opened in the browser, then there is a connection over the network, and we simply forgot to install the Internet Printing Client and / or reload the spooler.
Choose a printer: manufacturer “Generic”, printers “MS Publisher Imagesetter”. OK
"You have successfully installed ...." - it means everything is ok. click "Next"
Click "Print Test Page" to print a test page. "A test page was sent to the printer" - click "Close". "Finish" - to close the wizard