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 your Gentoo installation you need to install Samba and CUPS.

Installation
Edit to enable active directory support for cifs and samba. These use flags will pull in the required encryption needed for newer Windows servers.

Next (re)install and :

Configuration
Setting up your printers, is farely simple through the web-interface of CUPS. Point your browser to https://localhost:631 and click "Administration" and choose "Add Printer". You will be asked for a username and password of a printer administrator. Now choose "Windows Printer via SAMBA" and click continue. The connection to the Samba share is crucial to get your printers working. If you are on a domain, you will need to enter a connection URL as smb://USERNAME:PASSWORD@DOMAIN/URL/PRINTERSHARE, where you replace USERNAME, PASSWORD, DOMAIN, URL and PRINTERSHARE with the correct values. If not on a network with a domain-server you can leave out the part "DOMAIN/".

Troubleshooting
If you for some reason cannot print you can try to connect to the print server using the Samba client.

where "test.ps" is a postscript file located on your own computer in the current working directory.

If this test is working, then something went bad when setting up CUPS.