Bug 495304

Summary: store workgroup in SMB URI when browsing
Product: [Fedora] Fedora Reporter: Hedayat Vatankhah <hedayatv>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-04 16:19:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hedayat Vatankhah 2009-04-11 14:44:33 UTC
Description of problem:
I want to use a printer shared in a windows domain. I can configure the printer using system-config-printer. The printer needs authentication. I entered my username and password and system-config-printer successfully verified the printer connection. Till now, everything is OK. But, when I try to print something, it fails. After some investigation, I found that there is a problem with the printer URI which system-config-printer has saved in cups printer configuration file. 
The correct URI should be like this:
smb://username:password@domain/server/printershare

But the problem is that system-config-printer doesn't have any places for entering the domain/workgroup name. I put it inside the username field (domain\username), but system-config-printer puts this in the place of username field:

smb://domain\username:password@server/printershare

And it can verify the connection. Even without the domain name it can verify the connection but still I can't print anything (using this URI: smb://username:password@serverr/printershare).

Finally, I gave up using system-config-printer to fix the problem and edited the URI line manually to the correct one: smb://username:password@domainname/server/printershare and then, I was able to print using the printer.

So, I think an additional (and optional) domain/workgroup field should be added to the authentication section of system-config-printer, which will be saved as described.


Version-Release number of selected component (if applicable):
1.0.16-2.fc10.x86_64

How reproducible:
always

Steps to Reproduce:
1. Run system-config-printer
2. Try to add a new windows share printer with authentication information: username, domain name and password
3. view the contents of /etc/cups/printers.conf file, you'll see that the printer URI is not correct as mentioned above.
  
Actual results:
Wrong URI, cannot print anything.

Expected results:
Correct URI, being able to print!

Additional info:
I've also tried adding the printer without authentication info (so that it was supposed to ask for authentication information if needed), but when I tried to print, it says: cannot open authentication window (or something similar!).

Comment 1 Tim Waugh 2009-04-14 12:04:45 UTC
You need to put this in the URI field:

domain/server/printershare

and then fill in the username and password fields.  There is an explanatory note beneath the URI field.

(In reply to comment #0)
> I've also tried adding the printer without authentication info (so that it was
> supposed to ask for authentication information if needed), but when I tried to
> print, it says: cannot open authentication window (or something similar!).  

I think you are seeing that message due to gtk2 not currently being able to authenticate jobs.  Marek Kasik is working on fixing that.

Comment 2 Hedayat Vatankhah 2009-04-14 16:43:19 UTC
(In reply to comment #1)
> You need to put this in the URI field:
> 
> domain/server/printershare
> 
> and then fill in the username and password fields.  There is an explanatory
> note beneath the URI field.

Oh, yes you're right. really sorry! The main problem was that I didn't type the URI myself but used the Browse button, so I just didn't notice the comment. Sorry again. But it would be nice if the Browse button would add the domain/workgroup to the URI too.

Thanks anyway

Comment 3 Tim Waugh 2009-04-14 17:19:32 UTC
Ah, that's a different thing.  Yes, it ought to put the workgroup in the URI.  Thanks.

Comment 4 Hedayat Vatankhah 2009-04-14 18:04:03 UTC
Thank you for your notice.

Comment 5 Tim Waugh 2009-07-03 11:33:48 UTC
I haven't been able to reproduce the behaviour you describe -- system-config-printer adds the workgroup name into the URI whenever I use the 'Browse' button.

Could you please attach a screenshot showing the SMB browse window at the point just before you click the OK button?  Thanks.

Comment 6 Hedayat Vatankhah 2009-08-04 16:19:05 UTC
Well, I'm unable to reproduce that behavior too. The application works fine in regular environments. I'll reopen the bug if I found the bug again. 

Thanks again