Your message dated Tue, 15 Nov 2022 13:21:22 +0300
with message-id <[email protected]>
and subject line Re: /usr/sbin/smbd: printing=bsd does not work for Win8/10
clients
has caused the Debian Bug report #893689,
regarding /usr/sbin/smbd: printing=bsd does not work for Win8/10 clients
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
893689: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893689
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: samba
Version: 2:4.5.12+dfsg-2+deb9u2
Severity: normal
File: /usr/sbin/smbd
Dear Maintainer,
Printing from Win8/Win10 clients to a printer shared on a samba server
using printing=bsd does not work (printing from smbclient and WinXP/Win7
clients is OK).
The file to print is transferred to the spool directory, but
find_printer_index_by_hnd() fails with a "printer handle not found:
invalid handle" error, and printing is cancelled.
I made the following change to try to find out what's the problem
with the handle:
--- old/source3/rpc_server/rpc_handles.c 2016-05-23 13:05:17 +0200
+++ new/source3/rpc_server/rpc_handles.c 2018-03-09 16:21:43 +0100
@@ -346,8 +346,12 @@
count++;
}
- DEBUG(4,("Policy not found: "));
- dump_data(4, (const uint8_t *)hnd, sizeof(*hnd));
+ if (count==0)
+ DEBUG(4,("Policy list empty.\n"));
+ else {
+ DEBUG(4,("Policy not found: "));
+ dump_data(4, (const uint8_t *)hnd, sizeof(*hnd));
+ }
p->fault_state = DCERPC_FAULT_CONTEXT_MISMATCH;
With this change, the smbd log (level 10, attached) shows that the handle
isn't found because the policy list is empty.
Here is my smb.conf:
[global]
netbios name=hostname
workgroup=Workgroup
server string=%h.example.com
local master=no
security=user
passdb backend=smbpasswd
map to guest=bad password
wins support=yes
name resolve order=wins lmhosts host bcast
unix charset=ISO-8859-2
dos charset=CP852
acl allow execute always=yes
printing=bsd
load printers=no
min print space=1024
socket options=TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=65536 SO_RCVBUF=65536
use sendfile=yes
log level=10
[printer]
path=/var/spool/samba/printer
printable=yes
guest ok=yes
[nyomtato]
path=/var/spool/samba/printer
printable=yes
guest ok=yes
Although printing is cancelled, and lpr isn't called by samba, the
spooled file is not deleted, so I could work around the problem by
watching the spool directory with an inotify-based tool, and calling
lpr from there, but it would be nice to fix this in samba.
If you need more details, feel free to ask.
--
Zsolt
-- System Information:
Debian Release: 9.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 4.4.122 (SMP w/1 CPU core)
Locale: LANG=en_US.ISO-8859-2, LC_CTYPE=en_US.ISO-8859-2 (charmap=ISO-8859-2),
LANGUAGE=en_US.ISO-8859-2 (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages samba depends on:
ii adduser 3.115
ii dpkg 1.18.24
ii fake-update-inetd [update-inetd] 0.01
ii init-system-helpers 1.48
ii libbsd0 0.8.3-1
ii libc6 2.24-11+deb9u3
ii libldb1 2:1.1.27-1+b1
ii libpam-modules 1.1.8-3.6
ii libpam-runtime 1.1.8-3.6
ii libpopt0 1.16-10+b2
ii libpython2.7 2.7.13-2+deb9u2
ii libtalloc2 2.1.8-1
ii libtdb1 1.3.11-2
ii libtevent0 0.9.31-1
ii libwbclient0 2:4.5.12+dfsg-2+deb9u2
ii lsb-base 9.20161125
ii procps 2:3.3.12-3
ii python 2.7.13-2
ii python-dnspython 1.15.0-1
ii python-samba 2:4.5.12+dfsg-2+deb9u2
ii python2.7 2.7.13-2+deb9u2
ii samba-common 2:4.5.12+dfsg-2+deb9u2
ii samba-common-bin 2:4.5.12+dfsg-2+deb9u2
ii samba-libs 2:4.5.12+dfsg-2+deb9u2
ii tdb-tools 1.3.11-2
Versions of packages samba recommends:
pn attr <none>
ii logrotate 3.11.0-0.1
pn samba-dsdb-modules <none>
pn samba-vfs-modules <none>
Versions of packages samba suggests:
pn bind9 <none>
pn bind9utils <none>
pn ctdb <none>
pn ldb-tools <none>
ii ntp 1:4.2.8p10+dfsg-3+deb9u2
pn smbldap-tools <none>
pn ufw <none>
pn winbind <none>
log.smbd.gz
Description: application/gzip
--- End Message ---
--- Begin Message ---
Version: 2:4.13.0+dfsg-1
On Wed, 21 Mar 2018 09:39:03 +0100 Bartos-Elekes Zsolt <[email protected]> wrote:
Package: samba
Version: 2:4.5.12+dfsg-2+deb9u2
Severity: normal
File: /usr/sbin/smbd
Dear Maintainer,
Printing from Win8/Win10 clients to a printer shared on a samba server
using printing=bsd does not work (printing from smbclient and WinXP/Win7
clients is OK).
The file to print is transferred to the spool directory, but
find_printer_index_by_hnd() fails with a "printer handle not found:
invalid handle" error, and printing is cancelled.
We'we been using samba for printing since samba1.8 or something, for
a very long time, with various versions of windows machines.. It
always worked - the printing itself, - some other aspects were buggy
at times, like putting drivers for windows clients to the print share
or stuff like that.
The setting itself - printing=bsd - does not really affect the way
samba handles print jobs internally, the only difference is how it
finds the printer list and the default printing-related commands it
will use once it accepts the job. Here, it can't accept the job.
It is fun there was another bug report filed, #782628, which says
the opposite thing: there, more recent clients worked fine, but old
clients were failing.. :)
Either way, it *looks* like these issues are long gone now.
I'm closing this bugreport with version from bullseye (arbitrary).
If you think this is incorrect and the issue is still relevant for
the current version of samba, please feel free to reopen this bug
report and provide some more information about current behavior.
Thanks,
/mjt
--- End Message ---