Hi @s-hemer,

Many, many thanks for your note! I believe it helped me solve both this
issue, and the issue in SO:7150774 (mentioned in OP).

(Also, note that in the text below, I tried to add links to the
screenshots added as attachments)


> But when use the "Search ... " (Durchsuchen)-button with
> entered MYWORKGROUP/server/, it asks not just for the
> username and the password but also for the workgroup and I
> can login and view all the available printers there.

This was the critical tip - I take it you were talking about the
`system-config-printer` applet; however, I had some problems finding
exactly where this "Search" button is there.


First of all, in system-config-printer, upon "Add" / "Printer", one can choose 
"Find network printer":

https://launchpadlibrarian.net/96462666/sys-conf-print-findnet.png

... however, as the screenshot shows, the "Host" field there doesn't
accept forward slash ("removed disallowed character /") nor backslash -
so, an address like 'MYWORKGROUP/server/' cannot be entered.


So, I tried the "Windows Printer via SAMBA" option. But first, let me repeat my 
settings (a little more precisely than in the original post):

* My local username on my Ubuntu machine: MYUSERNAME
* Main address (domain) of the work network: myworkdomain.com
* My account name on the work network: MYWORKUSERNAME
* My work account is a member of workgroup MYWORKGROUP, which also has a 
subdomain myworkgroup.myworkdomain.com
* The print server on the work network is at printserver.myworkdomain.com
* The printer name (share) on the print server at work I want to access is 
PRINTSHARENAME

Note that in this work setup, my email address would be:
[email protected]

Second of all - our IT at work supplies information, that in order to
connect to printers, we should use the stanza:

smb://Userdomain/PrintServer/PrinterName

... in order to connect via CUPS (although, for some reason, the
localhost:631 always kept failing for me - which is why I wanted to use
system-config-printer instead).


So, the first part of the trick here, was to use the "Windows Printer
via SAMBA" option in system-config-printer - *and* enter the *full* path
to the given printer. I was otherwise hoping that I could use just
`smb://Userdomain/PrintServer` and obtain a list of available printers,
but cannot get that to work via system-config-printer (however, I can
use either smbclient for that; or login to terminal console via
rdesktop; and observe the printer names).

So, in my case, I enter:

smb://myworkgroup.myworkdomain.com/printserver.myworkdomain.com/PRINTSHARENAME

... in the "SMB Printer" field:

https://launchpadlibrarian.net/96464829/sys-conf-print-new-smb.png

... and then click on "Verify" button.


Finally, I can see the auth prompt window that has the domain:

https://launchpadlibrarian.net/96466242/sys-conf-print-smb-auth.png

And here I have to enter:
* Username: my full work email address, 
[email protected]
* .. and also password..

... however, the second part of the trick here, is that the "Domain:"
field should have the workgroup name here in allcaps (as Windows usually
refers to it) - for me, I *have* to enter MYWORKGROUP here (in allcaps)!
That is, if I enter it as subdomain `myworkgroup.myworkdomain.com`, then
authentication cannot pass!


And finally, authentication passes:

https://launchpadlibrarian.net/96467224/sys-conf-print-ok-smb-auth.png

... first with the "Print Share Verified / This print share is
accessible" message, and then with "searching for drivers" (upon
clicking Forward). I think I had to find the driver manually here and
have it installed.


HOWEVER, this is not the end of the story - at this point, although the printer 
is added - the authentication credentials are not saved anywhere; this suits me 
fine from a security perspective. The problem is, however, that the prompt 
*without* the domain/workgroup field will be server, to authenticate printing 
of a page!

Say, I want to print out a test page. Upon clicking the "Print test
page" button, the following dialog is shown:

https://launchpadlibrarian.net/96469709/sys-conf-print-smb-print-
auth.png

Now, since in the previous case, the username was specified through the
full email address - I would have guessed, that I should enter the same
here; however, that will *not* work! By trial and error - the only
configuration that worked for me here, is to actually enter the
following in this dialog:

Username: MYWORKGROUP\MYWORKUSERNAME

... where MYWORKGROUP is again in allcaps. Another error I made here is
that, after some years of `bash`, I have learned that a backslash in
Linux is always escaped... well, not so in this case here - here you
*must* enter only *one* backslash (in other words,
MYWORKGROUP\\MYWORKUSERNAME will fail).

In any case - at this point, the test page got printed out for me - so I
guess the problem is solved.


I'm not sure if I should reopen the bug, as apparently everything works - 
however, the process is not really intuitive, so I guess some sort of a 
documentation for this would be nice. But in all, I'm happy this got solved...

Thanks to all for the help,
Cheers!

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/848065

Title:
  system-config-printer cannot authenticate Windows Samba printer, while
  smbclient can (cli_init_creds)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/system-config-printer/+bug/848065/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to