acces denied samba printer shares after upgrade precise

Bug #990388 reported by Fred Müller
56
This bug affects 11 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Confirmed
Undecided
Unassigned
samba (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

--Google translate--
After upgrading to Precise access via Samba to the CUPS printer is no longer possible (see system below). Access to directory sharing works fine. The configuration file is smb.conf been secured and correctly.
The printer is in power readily identifiable, but fails to connect.
Error on the client PC "ACCESS_DENIED ....."

--Original--
Nach dem Upgrade auf Precise ist ein Zugriff über Samba auf die Cups-Printer nicht mehr möglich (siehe System unten). Ein Zugriff auf Verzeichnisfreigaben funktioniert problemlos. Die Konfigurationsdatei smb.conf ist gesichert worden und korrekt.
Der Drucker ist im Netz problemlos auffindbar, jedoch schlägt eine Verbindung fehl.
Fehler auf dem Client PC "ACCESS_DENIED....."

Server (Samba, Cups):
-----------------------------
Description: Ubuntu 12.04 LTS
Release: 12.04

Client:
--------
Description: Ubuntu 11.10
Release: 11.10

und

Description: Ubuntu 12.04 LTS
Release: 12.04

Tags: precise
Fred Müller (tim1900)
description: updated
Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

Hello
Try to launch e.g. gedit with sudo and try to print, to see if it is a permissions problem

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

description: updated
description: updated
tags: added: precise
Changed in ubuntu:
status: New → Incomplete
Revision history for this message
Fred Müller (tim1900) wrote :

Hello,

with sudo is the same problem.

Other test:
-----------

Print with smbclient at precise:
smb: \> print main.c
NT_STATUS_ACCESS_DENIED opening remote file main.c

Print with smbclient at oneirc:
OK

As root exists the self problem.
This problem exists only at precise. Last updatestand at oneirc was everything ok.

Greetings

Revision history for this message
Fred Müller (tim1900) wrote : Re: [Bug 990388] Re: acces denied samba printer shares after upgrade precise

Hello,

with sudo is the same problem.

Other test:
-----------

Print with smbclient at precise:
smb: \> print main.c
NT_STATUS_ACCESS_DENIED opening remote file main.c

Print with smbclient at oneirc:
OK

As root exists the self problem.
This problem exists only at precise. Last updatestand at oneirc was
everything ok.

Greetings

----

Am 28.04.2012 11:41, schrieb Fabio Marconi:
> Hello
> Try to launch e.g. gedit with sudo and try to print, to see if it is a permissions problem
>
> ---
> Ubuntu Bug Squad volunteer triager
> http://wiki.ubuntu.com/BugSquad
>
> ** Description changed:
>
> + After upgrading to Precise access via Samba to the CUPS printer is no longer possible (see system below). Access to directory sharing works fine. The configuration file is smb.conf been secured and correctly.
> + The printer is in power readily identifiable, but fails to connect.
> + Error on the client PC "ACCESS_DENIED ....."
> +
> + --Original--
> Nach dem Upgrade auf Precise ist ein Zugriff über Samba auf die Cups-Printer nicht mehr möglich (siehe System unten). Ein Zugriff auf Verzeichnisfreigaben funktioniert problemlos. Die Konfigurationsdatei smb.conf ist gesichert worden und korrekt.
> - Der Drucker ist im Netz problemlos auffindbar, jedoch schlägt eine Verbindung fehl. Eine Verbindung über IPP zu Cups ist erfolgreich und druckfähig.
> + Der Drucker ist im Netz problemlos auffindbar, jedoch schlägt eine Verbindung fehl.
> Fehler auf dem Client PC "ACCESS_DENIED....."
>
> Server (Samba, Cups):
> -----------------------------
> Description: Ubuntu 12.04 LTS
> Release: 12.04
>
> Client:
> --------
> Description: Ubuntu 11.10
> Release: 11.10
>
> und
>
> Description: Ubuntu 12.04 LTS
> Release: 12.04
>
> ** Description changed:
>
> +
> + --Google translate--
> After upgrading to Precise access via Samba to the CUPS printer is no longer possible (see system below). Access to directory sharing works fine. The configuration file is smb.conf been secured and correctly.
> The printer is in power readily identifiable, but fails to connect.
> Error on the client PC "ACCESS_DENIED ....."
>
> --Original--
> Nach dem Upgrade auf Precise ist ein Zugriff über Samba auf die Cups-Printer nicht mehr möglich (siehe System unten). Ein Zugriff auf Verzeichnisfreigaben funktioniert problemlos. Die Konfigurationsdatei smb.conf ist gesichert worden und korrekt.
> Der Drucker ist im Netz problemlos auffindbar, jedoch schlägt eine Verbindung fehl.
> Fehler auf dem Client PC "ACCESS_DENIED....."
>
> Server (Samba, Cups):
> -----------------------------
> Description: Ubuntu 12.04 LTS
> Release: 12.04
>
> Client:
> --------
> Description: Ubuntu 11.10
> Release: 11.10
>
> und
>
> Description: Ubuntu 12.04 LTS
> Release: 12.04
>
> ** Tags added: precise
>
> ** Changed in: ubuntu
> Status: New => Incomplete
>

Revision history for this message
Chris (fabricator4) wrote :

Trying to set up Samba to share a printer with a Windows machine. It used to be fairly simple to do this.

On another 12.04 test machine I tried starting gedit with sudo and printing a file. The following error message comes up in the printer status when selecting the printer to print on. It never says 'ready' or whatever it usually does.

NT_STATUS_ACCESS_DENIED opening remote spool config_txt

On a Windows XP machine it will see the host machine and the printer attached to it, but it will not set up the printer complaining that it has lost the connection to the printer. I interpret this as "Microsoft Speak" for "I don't know what the problem is because printers on a Workgroup aren't supposed to deny access.

Going back to the Unix client machine, if I print from a normal admin user I get prompted for authentication, but no amount of typing the correct password will get rid of the NT_STATUS_ACCESS_DENIED message.

I'm attaching smb.conf which is almost identical to the one that used to work with 10.04 LTS (but has been messed about with in deperation)

Chris

affects: ubuntu → cups (Ubuntu)
Revision history for this message
Fred Müller (tim1900) wrote :

Hello,

I have tested the smb conf. The problem (solution on precise) is the entry:
use client driver = yes.
If this is set everything works like oneirc.

(Mit dem Eintrag "use client driver = yes" funktioniert alles wieder.
Dieser Eintrag war bei Oneiric nicht nötig.)

Greetings

----

Am 29.04.2012 18:30, schrieb Chris:
> Trying to set up Samba to share a printer with a Windows machine. It
> used to be fairly simple to do this.
>
> On another 12.04 test machine I tried starting gedit with sudo and
> printing a file. The following error message comes up in the printer
> status when selecting the printer to print on. It never says 'ready' or
> whatever it usually does.
>
> NT_STATUS_ACCESS_DENIED opening remote spool config_txt
>
> On a Windows XP machine it will see the host machine and the printer
> attached to it, but it will not set up the printer complaining that it
> has lost the connection to the printer. I interpret this as "Microsoft
> Speak" for "I don't know what the problem is because printers on a
> Workgroup aren't supposed to deny access.
>
> Going back to the Unix client machine, if I print from a normal admin
> user I get prompted for authentication, but no amount of typing the
> correct password will get rid of the NT_STATUS_ACCESS_DENIED message.
>
> I'm attaching smb.conf which is almost identical to the one that used to
> work with 10.04 LTS (but has been messed about with in deperation)
>
>
> Chris
>
> ** Attachment added: "smb.conf"
> https://bugs.launchpad.net/ubuntu/+bug/990388/+attachment/3115733/+files/smb.conf
>

Revision history for this message
Julio (jcrinconc) wrote :

Hi Fred,

I tried your solution with no luck, can you please attach four smb.conf to compare with my own?

Thanks

Changed in cups (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Jimmy Merrild Krag (beruic) wrote :

Just to clarify: Is this bug about problems connecting FROM Ubuntu 12.04, TO samba printer shares with authorisation?
Please see http://askubuntu.com/questions/153517/ubuntu-12-04-network-printing-through-windows-samba-server/154081 also to verify whether it is the same problem.

Revision history for this message
Fred Müller (tim1900) wrote :

Hallo,

Am 22.06.2012 10:22, schrieb Jimmy Merrild Krag:
> Just to clarify: Is this bug about problems connecting FROM Ubuntu 12.04, TO samba printer shares with authorisation?
> Please see http://askubuntu.com/questions/153517/ubuntu-12-04-network-printing-through-windows-samba-server/154081 also to verify whether it is the same problem.
>

No, I create this dialogue not to confirm or dismiss a job (evince,
etc). The user data is correct, however. Remedy, the entry "use client
driver = yes" in the smb.conf. This was never before so no matter if I
have Debian, FreeBSD, or Ubuntu used to Precise.

Best Regards

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can also be a Samba problem as a change in smb.conf solves the problem.

Revision history for this message
Robie Basak (racb) wrote :

Could affected users who haven't already reported please report whether the workaround of adding "use client driver = no" works for you, or if it fails for you?

Assuming that "use client driver = yes" fixes the problem, it seems to me that this is a question about how the Windows printer driver concept works with samba.

If we don't want to ever install Windows printer drivers into samba, then it would make sense for Ubuntu to enable "use client driver = yes" by default. If we do want to be able to install Windows printer drivers into samba, then we must have "use client driver = no" (the default) in smb.conf by default.

If my understanding is correct, then users can:
  1) Set "use client driver = yes" and install printer drivers locally on each Windows client manually.
  2) Set "disable spoolss = yes" and downgrade samba's behaviour to older printing protocols, which do not support server-side storage of Windows printer drivers.
  3) Install a Windows printer driver into samba for each printer for which sharing is required, which is how printing works on Windows servers. This is documented but is a bit involved to set up, but it does provide the cleanest and most functional printing experience to Windows users.

So what should the default be? The current packaging does provide defaults to permit the beginnings of option 3, and changing the default to option 1 would break this.

Changed in samba (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Fred Müller (tim1900) wrote :
Download full text (3.4 KiB)

Hallo,

Am 25.06.2012 14:46, schrieb Robie Basak:
> Could affected users who haven't already reported please report whether
> the workaround of adding "use client driver = no" works for you, or if
> it fails for you?

Diese Konfigurationseinstellung "use client driver = yes|no" hatte ich
bis Precise (Version <= Oneiric) überhaupt nicht verwendet.

Ich verwende auch keine Windows-Clients sondern habe aus Kompatibilität
immer den Sambazugriff für die Drucker auch in Linux eingerichtet. Was
auch immer problemlos funktionierte bis Version Ubuntu Precise. Das war
auch kein Upgradeproblem sondern war bei einer Neuinstallation ebenso
vorhanden.

In der ersten Antwortmail von ....@bugs.launchpad.net war die
Konfigurationseinstellung "use client driver = yes", welche ich dann
verwendete -> Fazit Verbindungsproblem durch "Access Denied" war behoben.

Es handelte sich immer nur um Druckprobleme, welche sich in fehlerhafter
Autorisierung äußerten. Mit smbclient war dies ebenso. Hinweis mit der
gleichen Konfigurationsdatei smb.conf unter Oneiric funktionierte alles
ohne Probleme, auch ohne Konfigurationseintrag "use client driver =
....".

> Assuming that "use client driver = yes" fixes the problem, it seems to
> me that this is a question about how the Windows printer driver concept
> works with samba.
>
> If we don't want to ever install Windows printer drivers into samba,
> then it would make sense for Ubuntu to enable "use client driver = yes"
> by default. If we do want to be able to install Windows printer drivers
> into samba, then we must have "use client driver = no" (the default) in
> smb.conf by default.
>
> If my understanding is correct, then users can:
> 1) Set "use client driver = yes" and install printer drivers locally on each Windows client manually.

Set "use client driver = yes" and the connection to printer is ok
(access ok). Set "use client driver = no" or entry not available in
smb.conf -> error: access denied.

> 2) Set "disable spoolss = yes" and downgrade samba's behaviour to older printing protocols, which do not support server-side storage of Windows printer drivers.
> 3) Install a Windows printer driver into samba for each printer for which sharing is required, which is how printing works on Windows servers. This is documented but is a bit involved to set up, but it does provide the cleanest and most functional printing experience to Windows users.

Ich habe keine windows treiber installiert und dies auch zu keinem
Augenblick gewollt. die Treiber waren bereits eingerichtet (Linux
debian, ubuntu oneiric).

> So what should the default be? The current packaging does provide
> defaults to permit the beginnings of option 3, and changing the default
> to option 1 would break this.
>
> ** Changed in: samba (Ubuntu)
> Importance: Undecided => Medium

Ich möchte ein Upgrade machen ohne ständig Fehler zu suchen oder das
System ewig lang wieder zurückzustellen. Das System muss danach in einem
funktionsfähigen Zustand sein, dazu gehört Samba. Das ist wiederholt bei
einem Upgrade nicht der Fall. Da wird der Rechner einfach ausgeschaltet
- obwohl das Root-FS noch gemountet ist (schon 2x der Fall - selbst
Neuinstallation von Pre...

Read more...

Revision history for this message
hamishcarpenter (hamish-hamishcarpenter) wrote :

The fix in Comment #5 worked for me; adding 'use client driver = yes' under the [printers] section of /etc/samba/smb.conf

Same situation as OP: Ubuntu 11.10 upgrades to 12.04.
Windows client: Windows XP

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in samba (Ubuntu):
status: New → Confirmed
Revision history for this message
Jan Rathmann (kaiserclaudius) wrote :

Adding 'use client driver = yes' worked for me also.

Revision history for this message
rasos (rasos) wrote :

Fix as described in askubuntu #7 worked for me. I copy it here for reference with some adaptions, credits go to RobDavenport.

== Set up printer shared on a sambe network with authentication ==

    Choose Add new printer in Printing, click open 'Network Printers', select 'Windows Printer via SAMBA'

    Click 'Browse' to browse for printer (it prompts for authentication to access Windows server with printer)

    or enter 'smb://sambadomain/servername/printername' e.g. smb://uclv/printers.mycompany.at/a4-e105

    Select 'Set authentication details now'

    Enter details as 'domain\username' and password
    (if you click 'verify' now it will say printer is not accessible, but click Forward anyway.)

    Select driver

    Print test page

Just to be clear: I always could print from Ubuntu 11.10, but not from 12.04 Desktop to printers served by a Windows server.
If I rename a printer, I get again the authentication error. The above set up worked.

Revision history for this message
Thanos Kyritsis (djart) wrote :

Comment #5 works for me as well.

Revision history for this message
Socket (nick-regist) wrote :

Comment #5 works also for me with both server and client running Ubuntu 12.04. Without that directive it seems there's some privileges problems with the nobody user (the default bad-user mapping)

Excerpt from server's smb.conf:

[global]
   map to guest = bad user
########## Printing ##########
   load printers = yes
   printing = cups
   printcap name = cups
   use client driver = yes

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   public = yes
   guest ok = yes
   read only = yes
   create mask = 0700

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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