[Pkg-samba-maint] Bug#816386: samba: Samba cuts off the printer name when using the FQDN on Windows clients
Jan Drees
jdrees at mail.uni-paderborn.de
Tue Mar 1 13:00:45 UTC 2016
Package: samba
Version: 2:4.1.17+dfsg-2+deb8u1
Severity: normal
Dear Maintainer,
We are trying to upgrade our Samba print server to jessie.
There is a local cups server to manage the printing and Samba should allow access for windows clients.
Authentication is managed via Active Directory, but even without authentication, printing does not work.
Adding a printer in Windows always returns "Windows couldn't connect to the printer. Check the printer name and try again. If this is a network printer, make sure that the printer is turned on, and that the printer address is correct".
Digging into the logs unearthed the fact that the printer name is cut off when using the FQDN for the server.
(" _spoolss_OpenPrinterEx: Cannot open a printer handle for printer \\cupsad3.cs.upb.de")
We expected that the full printer name would be used instead.
-- System Information:
Debian Release: 8.3
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages samba depends on:
ii adduser 3.113+nmu3
ii dpkg 1.17.26
ii libasn1-8-heimdal 1.6~rc2+dfsg-9
ii libbsd0 0.7.0-2
ii libc6 2.19-18+deb8u3
ii libcomerr2 1.42.12-1.1
ii libhdb9-heimdal [heimdal-hdb-api-8] 1.6~rc2+dfsg-9
ii libkdc2-heimdal 1.6~rc2+dfsg-9
ii libkrb5-26-heimdal 1.6~rc2+dfsg-9
ii libldb1 2:1.1.17-2+deb8u1
ii libpam-modules 1.1.8-3.1+deb8u1
ii libpam-runtime 1.1.8-3.1+deb8u1
ii libpopt0 1.16-10
ii libpython2.7 2.7.9-2
ii libroken18-heimdal 1.6~rc2+dfsg-9
ii libtalloc2 2.1.1-2
ii libtdb1 1.3.1-1
ii libtevent0 0.9.21-1
ii lsb-base 4.1+Debian13+nmu1
ii multiarch-support 2.19-18+deb8u3
ii procps 2:3.3.9-9
ii python 2.7.9-1
ii python-dnspython 1.12.0-1
ii python-ntdb 1.0-5
ii python-samba 2:4.1.17+dfsg-2+deb8u1
pn python2.7:any <none>
ii samba-common 2:4.1.17+dfsg-2+deb8u1
ii samba-common-bin 2:4.1.17+dfsg-2+deb8u1
ii samba-dsdb-modules 2:4.1.17+dfsg-2+deb8u1
ii samba-libs 2:4.1.17+dfsg-2+deb8u1
ii tdb-tools 1.3.1-1
ii update-inetd 4.43
Versions of packages samba recommends:
ii attr 1:2.4.47-2
ii logrotate 3.8.7-1+b1
ii samba-vfs-modules 2:4.1.17+dfsg-2+deb8u1
Versions of packages samba suggests:
pn bind9 <none>
pn bind9utils <none>
pn ctdb <none>
pn ldb-tools <none>
ii ntp 1:4.2.6.p5+dfsg-7+deb8u1
pn smbldap-tools <none>
ii winbind 2:4.1.17+dfsg-2+deb8u1
-- Configuration Files:
/etc/init/smbd.conf changed:
description "SMB/CIFS File Server"
author "Steve Langasek <steve.langasek at ubuntu.com>"
start on (local-filesystems and net-device-up)
stop on runlevel [!2345]
respawn
sleep 10
pre-start script
[ -r /etc/default/samba ] && . /etc/default/samba
install -o root -g root -m 755 -d /var/run/samba
end script
exec smbd -F
/etc/samba/smb.conf changed:
[global]
server string = Cupsserver %h
security = ADS
realm = AD.[redacted]
workgroup = AD
netbios name = [redacted]
password server = AD.[redacted]
hosts allow = [redacted]
deadtime = 15
preferred master = no
domain master = no
local master = no
encrypt passwords = yes
idmap config *:backend = nss
idmap config *:range = 70001-80000
idmap config AD:backend = ad
idmap config AD:schema_mode = rfc2307
idmap config AD:range = 3000000-4000000
winbind nss info = rfc2307
winbind trusted domains only = no
winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes
vfs objects = acl_xattr
map acl inherit = Yes
store dos attributes = Yes
log file = /var/log/samba/%m.log
add machine script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
log level = 4
socket options = TCP_NODELAY IPTOS_LOWDELAY
read raw = yes
write raw = yes
oplocks = yes
veto oplock files = /*.doc/*.xls/*.mdb/
max open files = 500
getwd cache = yes
winbind use default domain = yes
guest ok = yes
load printers = yes
show add printer wizard = yes
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
use client driver = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
public = yes
writable = no
printable = yes
guest ok = yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
create mask = 0775
directory mask = 0775
guest ok = yes
write list = root, Administrator
[test]
browseable = yes
read only = no
guest ok = yes
path = /srv/samba/share
--Log Files:
/var/log/samba/[client].log
....
[2016/03/01 13:26:49.794165, 4] ../source3/smbd/uid.c:384(change_to_user)
Skipping user change - already user
[2016/03/01 13:26:49.794232, 4] ../source3/smbd/sec_ctx.c:216(push_sec_ctx)
push_sec_ctx(33037, 10000) : sec_ctx_stack_ndx = 1
[2016/03/01 13:26:49.794278, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (33037, 10000) - sec_ctx_stack_ndx = 1
[2016/03/01 13:26:49.794331, 4] ../source3/rpc_server/srv_pipe.c:1356(api_rpcTNP)
api_rpcTNP: \spoolss op 0x45 - api_rpcTNP: rpc command: SPOOLSS_OPENPRINTEREX
[2016/03/01 13:26:49.794382, 4] ../source3/smbd/sec_ctx.c:216(push_sec_ctx)
push_sec_ctx(33037, 10000) : sec_ctx_stack_ndx = 2
[2016/03/01 13:26:49.794423, 4] ../source3/smbd/uid.c:485(push_conn_ctx)
push_conn_ctx(4122323709) : conn_ctx_stack_ndx = 0
[2016/03/01 13:26:49.794459, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 2
[2016/03/01 13:26:49.794512, 4] ../source3/smbd/sec_ctx.c:424(pop_sec_ctx)
pop_sec_ctx (33037, 10000) - sec_ctx_stack_ndx = 1
checking name: \\cupsad3.cs.upb.de\lw-f2-520
[2016/03/01 13:26:49.794569, 3] ../source3/rpc_server/spoolss/srv_spoolss_nt.c:506(set_printer_hnd_printertype)
Setting printer type=\\cupsad3.cs.upb.de\lw-f2-520
Printer is a printer
[2016/03/01 13:26:49.794619, 4] ../source3/rpc_server/spoolss/srv_spoolss_nt.c:566(set_printer_hnd_name)
Setting printer name=\\cupsad3.cs.upb.de\lw-f2-520 (len=29)
[2016/03/01 13:26:49.794726, 3] ../source3/rpc_server/spoolss/srv_spoolss_nt.c:1747(_spoolss_OpenPrinterEx)
_spoolss_OpenPrinterEx: Cannot open a printer handle for printer \\cupsad3.cs.upb.de
[2016/03/01 13:26:49.794788, 4] ../source3/smbd/sec_ctx.c:424(pop_sec_ctx)
pop_sec_ctx (33037, 10000) - sec_ctx_stack_ndx = 0
[2016/03/01 13:26:49.794847, 3] ../source3/rpc_server/srv_pipe_hnd.c:122(free_pipe_context)
free_pipe_context: destroying talloc pool of size 29
[2016/03/01 13:26:49.795247, 4] ../source3/smbd/uid.c:384(change_to_user)
Skipping user change - already user
[2016/03/01 13:27:04.775749, 4] ../source3/smbd/uid.c:384(change_to_user)
Skipping user change - already user
[2016/03/01 13:27:04.775839, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2016/03/01 13:27:04.775947, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2016/03/01 13:27:04.776014, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2016/03/01 13:27:04.776047, 3] ../source3/smbd/service.c:1130(close_cnum)
vm-pool20 (ipv4:131.234.29.120:49567) closed connection to service IPC$
[2016/03/01 13:27:04.776087, 4] ../source3/smbd/vfs.c:838(vfs_ChDir)
vfs_ChDir to /
[2016/03/01 13:27:04.776125, 4] ../source3/smbd/vfs.c:849(vfs_ChDir)
vfs_ChDir got /
[2016/03/01 13:27:04.776151, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2016/03/01 13:27:04.776537, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2016/03/01 13:27:04.776589, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2016/03/01 13:27:04.776982, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2016/03/01 13:27:04.777026, 4] ../source3/smbd/sec_ctx.c:316(set_sec_ctx)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2016/03/01 13:27:04.777155, 3] ../source3/smbd/server_exit.c:221(exit_server_common)
Server exit (NT_STATUS_CONNECTION_RESET)
More information about the Pkg-samba-maint
mailing list