system-config-printer: Windows/Samba printer authentication too complicated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
system-config-printer (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Hi all,
Apologies for the nagging if this is not really a bug... but here it is:
I have already posted about this here:
http://
... here it is in brief:
I'm using Ubuntu machine at work, where printers are shared via Samba.
Assume on that network, I am <email address hidden> (apparently, the 'myworkdomain.com' is my "workgroup") with password MYWORKPASSWORD; and I'm trying to access PRINTSHARENAME on the print server printserver.
Trying to list the print shares using smbclient seems to work fine (even though there is that "session request failed"):
$ smbclient -L \\printserver.
Enter MYWORKUSERNAME's password:
Domain=
Sharename Type Comment
--------- ---- -------
printer-name Printer HP Color LaserJet CP6015DN PCL6
PRINTSHARENAME Printer HP Color LaserJet CP6015DN PCL6
...
print$ Disk Printer Drivers
session request to PRINTSERVER.MY failed (Called name not present)
Domain=
Server Comment
--------- -------
Workgroup Master
--------- -------
However, system-
smb://myworkdom
... but when I do that, and click on Verify, I'm asked for user credentials (it's on "Prompt user if authentication is required"), which I enter, and then the process fails with "Not authorized : The password may be incorrect".
Here are the last few lines of `system-
pysmb: authentication pass: 2
pysmb: try auth as guest
pysmb: got password callback; user LoCaLuSeR, use_user guest; workgroup WORKGROUP, self.use_workgroup WORKGROUP; server printserver.
pysmb: operation failed: PermissionError(13, 'Permission denied')
pysmb: authentication pass: 3
pysmb: try as LoCaLuSeR
pysmb: got password callback; user LoCaLuSeR, use_user MYWORKUSERNAME; workgroup WORKGROUP, self.use_workgroup myworkdomain.com; server printserver.
pysmb: operation failed: PermissionError(13, 'Permission denied')
pysmb: authentication pass: 4
get_notifications
update_jobs
Next notifications fetch in 60s
[here prompt repeats]
Apparently, after iterating local users on the machine, then it finally gets to the auth entered in the "Verify" prompt, but that doesn't seem to do much...
I have isolated this in a small Python script, extracting relevant lines from system-
import smbc, os
def do_auth (svr, shr, wg, un, pw):
return ("myworkdomain.
ctx = smbc.Context (debug=10, auth_fn=do_auth)
f = ctx.open ("smb://%s/%s" % ("printserver.
When I run this script (python test.py) - I get at the end:
....
smb_mid=3
smt_wct=0
smb_bcc=0
SPNEGO login failed: Logon failure
cli_init_creds: user domain myworkdomain.com
session setup ok
map_errno_
Traceback (most recent call last):
File "test.py", line 6, in <module>
f = ctx.open ("smb://%s/%s" % ("printserver.
smbc.Permission
... as if the user name hasn't propagated at all to cli_init_creds!
So, if smbclient can list the shares, then I guess system-
Thanks in advance for any guidance for this,
Cheers!
PS:
Ubuntu 11.04
$ apt-cache policy system-
system-
Installed: 1.3.1+20110222-
Candidate: 1.3.1+20110222-
Changed in system-config-printer (Ubuntu): | |
status: | New → Incomplete |
Tim, can you have a look into this?