CUPS as printer client for Microsoft server
Many Microsoft servers started using encryption for their shares. This is also the case for Windows printer shares. In order to print from a Gentoo installation Samba and CUPS will be needed.
Edit /etc/portage/package.use to enable active directory support for CIFS and Samba. The following USE flags will pull in the required encryption needed for newer Windows servers:
echo "net-fs/cifs-utils ads creds upcall" >> /etc/portage/package.use
echo "net-fs/samba caps addns ads" >> /etc/portage/package.use
Next (re)install net-fs/samba and net-print/cups:
emerge --ask --oneshot net-fs/samba net-print/cups
Setting up printers is fairly simple through the web-interface of CUPS. Point a browser to
https://localhost:631 (which is the default location for the CUPS interface). Click Administration and choose Add Printer. There will be a prompt for a username and password of the printer administrator. Now choose Windows Printer via SAMBA and click continue. The connection to the Samba share is crucial to get the printers working. If on a domain a connection URL will need to be entered. An example is
Where the values for
PRINTERSHARE are properly substituted with the appropriate values for each use case. When not on a network with a domain-server leave out the
DOMAIN/ section of the string.
If users cannot print try to connect to the print server using the Samba client:
smbclient -W DOMAIN -U USERNAME //SERVER/PRINTER
Password: PASSWORD Domain=[DOMAIN] OS=[Windows Server 2008 R2 Datacenter 7601 Service Pack 1] Server=[Windows Server 2008 R2 Datacenter 6.1] smb: \> print test.ps printing file test.ps as test.ps (196,6 kb/s) (average 196,6 kb/s) smb: \> quit
test.ps is a postscript file located in the local current working directory.
If this test is working, then something went bad when setting up CUPS.