Let’s say you have CUPS installed and now you want access to a Windows Printer on the network but it can only be accessed via SAMBA (SMB). However, on your CUPS Add Printer options you can’t find one to add a SAMBA printer.
In order to enable it, you need to open a terminal and run the following commands:
sudo apt install samba
sudo apt-get install libsmbclient
sudo apt-get install smbclient
sudo apt-get install python-smbc
sudo apt-get install smbclient
sudo apt-get install python-smbc
sudo service cups restart
Then, Windows Printer via SAMBA should show up as one of your last options in Add Printer.
If the printer can only be accessed via login then you will have to add the credentials as part of the URI like this:
smb://username:password@domainname/printserver/V_2_24
Warning! If your username or password has reserved characters: ! * ' ( ) ; : @ & = + $ , / ? % # [ ] then you'll need to percent escape them to represent them correctly, especially for @; the URL will get confused with the @ used before the domain name.
Warning! If your username or password has reserved characters: ! * ' ( ) ; : @ & = + $ , / ? % # [ ] then you'll need to percent escape them to represent them correctly, especially for @; the URL will get confused with the @ used before the domain name.
Otherwise, the job will be held up in the queue and print jobs will return an internal error like this: Session setup failed: NT_STATUS_INTERNAL_ERROR
Happy Printing!
Resources: