0

I'm running Ubuntu 15.10. (Gnome edition)

I want to access a Windows print queue that is on a different local network but it does not show up in the list when I try to add a new printer. I've noticed that the search field is only for filtering, not for specifying the url. Add a new printer

I have also tried to add the print queue by using CUPS (http://127.0.0.1:631/). There I can add a new Samba printer and specify the url smb://username@print.mycompany.net/printqueue_ps The problem is that I never get prompted for my password. I only get an error saying:

held since
Mon 15 Feb 2016 01:54:32 PM CET 
"Session setup failed: NT_STATUS_LOGON_FAILURE"

I have seen a proposed solutions that feels a bit too hack-ish, where I'm supposed to store my password in plain text in some file somewhere. Of course I don't want to do that.

From command line I can print to the print queue using smbclient. And then I'm correctly prompted for my password, just like I want.

smbclient -U domain/username //print.mycompany.net/printqueue_ps -c "print some_file.txt"

If you look at the old way of adding a printer: How do I add printers from a windows print server Where did those settings end up? Can I do the same setup manually in some configuration file somewhere?

Thank you!

1 Answers1

0

First of all I can start the old(?) print manager by starting the system-config-printer program. Here is a good guide: How to add a printer in gnome-shell

I think I managed to solve my problem. In order to avoid storing the password in plain text in /etc/cups/printers.conf I need it to prompt me for my AD username and password every time I want to print something, which is what I want. As far as I have figured out there are two important lines in /etc/cups/printers.conf that are relevant for my problem.

AuthInfoRequired username,password
DeviceURI smb://domain/print.mycompany.net/printqueue_ps

I need the AuthInfoRequired line in order to be prompted for my username and password. If I specify my AD username on the URI line then it will still ask me for my username and password but apparently just ignore what I type, resulting in a failed authentication. I originally figured that if I specify my username but not my password then I will only have to provide my password every time I want to print something. Apparently it does not work this way. It always defaults to my Ubuntu username and not my AD username. I have not figured out a way of fixing this.

Please note that you have to stop CUPS whenever you want to edit /etc/cups/printers.conf manually.

$ sudo service cups stop
$ sudo nano /etc/cups/printers.conf
$ sudo service cups start