在 CentOS 6.4 (newdc) 上,我安装了 CUPS 1.4.2-50.el6_4.5,可以访问其 Web 界面。在那里,我设置了我们的主要共享打印机 OCE Imagistics cm2520,并成功打印了测试页。
当 SerNet Samba 4.0.9 在同一个盒子上配置了我能找到的所有示例方式时,我似乎无法达到在 Windows(W2K3、OLDDC)中双击打印机打开打印队列的程度(就像它所做的那样)来自 \olddc)。通过在 smb.conf 中手动定义打印机,我得到的最接近结果是它显示在 Windows 资源管理器中的 \newdc 中,但双击 BackOfficeCopier 打印机会出现此错误:
---------------------------
Printers
---------------------------
Operation could not be completed. Either the printer name was typed incorrectly, or the specified printer has lost its connection to the server. For more information, click Help.
---------------------------
OK Help
---------------------------
如果我双击“打印机”共享,我会得到:
---------------------------
\\newdc
---------------------------
\\newdc\printers is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
Incorrect function.
---------------------------
OK
---------------------------
这些都不会导致条目出现在 log.samba 中。但是,双击“打印机和传真”会显示一个仅包含“添加打印机”的文件夹,并在 log.samba 中生成以下日志条目:
[2013/08/23 09:18:39.921226, 0] ../source4/smb_server/smb/service.c:127(make_connection)
make_connection: couldn't find service ::{2227A280-3AEA-1069-A2DE-08002B30309D}: NT_STATUS_OBJECT_NAME_NOT_FOUND
[2013/08/23 09:18:39.935896, 0] ../source4/rpc_server/spoolss/dcesrv_spoolss.c:1189(dcesrv_spoolss_RemoteFindFirstPrinterChangeNotifyEx)
unable to call back to \\OLDDC
[2013/08/23 09:18:39.952321, 0] ../source4/rpc_server/spoolss/dcesrv_spoolss.c:1189(dcesrv_spoolss_RemoteFindFirstPrinterChangeNotifyEx)
unable to call back to \\OLDDC
如果我随后尝试“添加打印机”并单击“下一步”,我唯一的选择是顶部打印机,并且没有列出端口。此时再次尝试“下一步”只会给出:
---------------------------
Add Printer Wizard
---------------------------
Operation could not be completed.
---------------------------
OK
---------------------------
关于第一个错误,CUPS 中的队列名称是 OCE,在 smb.conf 中我有以下内容:
[global]
workgroup = MYDOMAIN
realm = mydomain.lan
netbios name = NEWDC
server role = active directory domain controller
server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, smb, dns
allow dns updates = true
dns forwarder = 192.168.1.1
# dns recursive queries = yes
dcerpc endpoint servers = epmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, spoolss, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver, winreg, srvsvc
# dcerpc endpoint servers = winreg srvsvc
load printers = yes
printing = cups
printcap name = cups
[netlogon]
path = /var/lib/samba/sysvol/mydomain.lan/scripts
read only = No
[sysvol]
path = /var/lib/samba/sysvol
read only = No
[printers]
comment = All Printers
path = /var/spool/samba/
guest ok = Yes
browseable = Yes
read only = No
printable = Yes
create mask = 0700
[print$]
comment = Point and Print Printer Drivers
path = /var/lib/samba/printing
read only = No
[BackOfficeCopier]
path = /var/spool/samba/
browseable = yes
printable = yes
printer name = OCE
[mytest]
path = /home/srv/samba-test-share
read only = No
就 ACL 而言,第二个错误等:
$ sudo ls -l /var/spool/
...
drwxrwxrwt. 2 root root 4096 Aug 15 18:10 samba
$ sudo ls -l /var/lib/samba/
...
drwxr-xr-x. 4 root root 4096 Aug 22 22:19 printing
在 chmodding 打印回 755 之前,我将所有内容从 \olddc\print$ 复制到 \newdc\print$。
我遵循了 HOWTO。 CUPS 正确设置了我的打印机。权限似乎是正确的。我缺少什么?