Odd quirk when trying to install SMB Printers

Bug #57666 reported by Tareq A. Khandaker
10
Affects Status Importance Assigned to Milestone
KDE Base
Unknown
Medium
kdebase (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: kdeprint OR a samba-related package

Basically, I was trying to install a printer attached to a Windows XP machine through KDEPrint. I selected Windows SMB, then tried anonymous login (seeing as Windows File and Printer Sharing needed no password). I hit 'Scan' and I saw the network name and computers, but I kept getting an

"Error returning browse list:
 NT_STATUS_ACCESS_DENIED"

I tried using guest but I was not able to scan the network. I searched for the error on the Internet, and I found a solution here: http://www.mepis.org/node/3458

First, scan the network with anonymous login, then go back and select guest. Now, WITHOUT scanning again, expand the host with the printer: Voila! printer found.

However, as a user, I should not have to use this workaround to install a printer (however painless) since the workaround is not at all intuitive.

The guest selection should be able to expand the network tree to browse for a printer.

Related branches

Revision history for this message
Tareq A. Khandaker (tareqak) wrote :

I don't know if this will help any, but I can browse to the computer using Konqueror's smb:// kio interface. Once I get there though, I only see folders and no printers. Somewhat odd, since I can see and use the printer on another Windows XP computer (the printer is definitely shared).

description: updated
description: updated
Revision history for this message
Guillaume Martres (smarter) wrote :

There's a workaround:
- choose anonymous login
- Scan the network
- click the network group of your computer to see your computer's name
- go back
- choose guest login
- click on the name of your computer
- click on your printer's name
- and it works ;)

Revision history for this message
Tareq A. Khandaker (tareqak) wrote :

The link I posted mentions the same workaround. However, the workaround should not be needed (you don't have to do something like that in Windows so it is not intuitive for a new user). One simple solution could be to have the workaround done silently so that you can choose guest login and it does the anonymous scanning for you (or vice versa).

Revision history for this message
daller (daniel-dallerweb) wrote :

I can only confirm this manner...

Maybe the host (Windows machine) doesn't accept anonymous logins, but choosing "guest login" in the beginning should definately do the same as "visiting the anonymous page"

/Daller

Revision history for this message
Yuriy Kozlov (yuriy-kozlov) wrote :

I can confirm this on latest Feisty, and have always had this problem adding SMB printers. Thank you for the workaround!

Changed in kdebase:
status: Unconfirmed → Confirmed
Revision history for this message
Anthony Mercatante (tonio) wrote :

ksambaplugins puts a corrupted default config on initial setup...
I'll try to get it fixed to the release, but I can't promiss anything...

Revision history for this message
Anthony Mercatante (tonio) wrote :

changed status to "in progress"

Changed in kdebase:
status: Confirmed → In Progress
Revision history for this message
Guillaume Martres (smarter) wrote :

This bug is still present on Gutsy.

Revision history for this message
david dahan (dahan-dave) wrote :

Best workaround I found is to install system-config-printer and use it to add printers . It works !

Revision history for this message
Guillaume Martres (smarter) wrote :

I've made a patch which should allow anonymous user to access to the printer but I can't get guest to list the computers, it looks like there's a bug in smbclient:
[smarter@fenny ~/Builds/kdelibs]% cat password
username =
password =
domain =
[smarter@fenny ~/Builds/kdelibs]% smbclient -N -L 'WINXP' -W WORKSGROUP -Apassword
Domain=[WORKSGROUP] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename Type Comment
        --------- ---- -------
cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine PAPA. Error was NT_STATUS_ACCESS_DENIED
Error returning browse list: NT_STATUS_ACCESS_DENIED
Domain=[WORKSGROUP] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server Comment
        --------- -------
        WINXP ordinateur de bureau

        Workgroup Master
        --------- -------
        WORKSGROUP WINXP
[smarter@fenny ~/Builds/kdelibs]% nano password
[smarter@fenny ~/Builds/kdelibs]% cat password
username = guest
password =
domain =
[smarter@fenny ~/Builds/kdelibs]% smbclient -N -L 'WINXP' -W WORKSGROUP -Apassword
Domain=[WINXP] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename Type Comment
        --------- ---- -------
        IPC$ IPC IPC distant
        print$ Disk Pilotes d'imprimantes
        SharedDocs Disk
        Imprimante Printer hp deskjet 940c
Domain=[WINXP] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server Comment
        --------- -------

        Workgroup Master
        --------- -------

The Lines "Server" and "Workgroup" are empty when a username(guest) is provided, but have the correct informations if the connection fails with "NT_STATUS_ACCESS_DENIED"! That's why the "anonymous" login can list the computers and the "guest" can't. And there's something even more strange:
[smarter@fenny ~/Builds/kdelibs]% smbclient -N -L 'WINXP' -W WORKSGROUP
Domain=[PAPA] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename Type Comment
        --------- ---- -------
        IPC$ IPC IPC distant
        print$ Disk Pilotes d'imprimantes
        SharedDocs Disk
        Imprimante Printer hp deskjet 940c
Domain=[WINXP] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server Comment
        --------- -------

        Workgroup Master
        --------- -------

There's no "NT_STATUS_ACCESS_DENIED" message if you don't use the -A<file> option!

kdelibs .debs with my patch are available at: http://ppa.launchpad.net/smarter/ubuntu/pool/main/k/kdelibs/ (the *ubuntu3.2~ppa4_*.deb packages).

Revision history for this message
Guillaume Martres (smarter) wrote :

I've posted the above code to pastebin for more clarity: http://kubuntu-fr.pastebin.com/f492fa784

Revision history for this message
Kai Blin (kai.blin) wrote :

Did this feature ever work with "guest"?
I'm trying to check if browsing for printers as guest is working under winxp or similar client systems.
Can you check if it works with a valid user?

Revision history for this message
Guillaume Martres (smarter) wrote :

Kai Blin: I tried with a valid user and I get the same thing that with "guest" user, it's maybe because my xp account doesn't have a password and have an accent in the username.

Revision history for this message
Guillaume Martres (smarter) wrote :

I've modified my patch so that guest browsing works too.
Packages will soon be available at: http://ppa.launchpad.net/smarter/ubuntu/pool/main/k/kdelibs/ (they will have ~ppa5 in their name).

Revision history for this message
Jonathan Riddell (jr) wrote :

Patch uploaded to hardy in 3.5.8-4ubuntu2, please test.

Changed in kdebase:
status: Unknown → New
Revision history for this message
Guillaume Martres (smarter) wrote :

This bug should be marked as Fix Released.

Revision history for this message
Yuriy Kozlov (yuriy-kozlov) wrote :

Confirmed fixed in Hardy.

Changed in kdebase:
status: In Progress → Fix Released
Changed in kdebase:
importance: Unknown → Medium
Changed in kdebase:
status: New → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.