samba 打印有问题。我在 Ubuntu 11.04 服务器上安装了 CUPS 打印机,效果很好。
当我尝试配置 samba 以允许 XP 机器使用打印机时,它在打印时失败。我可以从服务器安装 XP 的打印机驱动程序,并且打印机出现在 XP 打印机控制面板中。当我尝试从 XP 机器打印测试页时,我在系统事件日志中收到此错误:
Jun 27 20:33:29 FatController smbd[3571]: [2012/06/27 20:33:29, 0] rpc_server/srv_netlog_nt.c:603(_netr_ServerAuthenticate3)
Jun 27 20:33:29 FatController smbd[3571]: _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client JAMES machine account JAMES$
Run Code Online (Sandbox Code Playgroud)
这是我的 smb.conf 文件:
[global]
server string = %h (Server)
workgroup = SODOR
encrypt passwords = true
security = user
os level = 255
preferred master = yes
domain master = yes
local master = yes
logon path = \\%L\profile\%U
logon drive = S:
logon home = \\%L\home\%U
domain logons = yes
map to guest = Never
guest ok = no
dns proxy = no
time server = yes
logon script = logon.bat
load printers = yes
printing = cups
printcap name = cups
nt acl support = no
interfaces = eth1 lo
bind interfaces only = yes
smb ports = 445
[netlogon]
comment = Net Log On
path = /home/samba/netlogon
guest ok = no
read only = yes
browseable = no
[profile]
comment = User Profiles
path = /home/samba/profiles
read only = no
create mask = 0600
directory mask = 0700
browseable = no
store dos attributes = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = no
printable = yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
guest ok = no
read only = yes
write list = root, skizz
Run Code Online (Sandbox Code Playgroud)
任何人都知道问题是什么以及如何解决它?
除了上述,我还收到此错误:
Jun 27 21:56:35 FatController smbd[3571]: [2012/06/27 21:56:35, 0] printing/print_cups.c:1027(cups_job_submit)
Jun 27 21:56:35 FatController smbd[3571]: Unable to print file to `Edward' - client-error-not-authorized
Run Code Online (Sandbox Code Playgroud)
我认为这更相关。
如果您不太喜欢使用 Samba,您可以使用IPP共享打印机:
将 Windows 客户端连接到 Linux 打印服务器的首选方法是使用 IPP。它是一种基于 HTTP 的标准打印机协议,允许您通过端口转发、隧道等各种方式获利。配置非常简单,而且这种方式比使用 Samba 更不容易出错。自 Windows 2000 以来,Windows 原生支持 IPP。要配置服务器端,您需要启用浏览/etc/cups/cupsd.conf,通过添加“BrowesAllow all”行:
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
BrowseAllow all
Run Code Online (Sandbox Code Playgroud)
在 Windows 计算机上,转到打印机控制面板并选择“添加新打印机”。接下来,选择提供一个 URL。对于 URL,输入打印机的位置:(http://host_ip_address:631/printers/printer_name其中 host_ip_address 是 GNU/Linux 服务器的 IP 地址,printer_name 是所连接的打印机的名称)。
之后,在 Windows 计算机上为您的打印机安装本机打印机驱动程序。如果 CUPS 服务器设置为使用其自己的打印机驱动程序,那么您只需为 Windows 客户端选择一个通用的 postscript 打印机(例如“HP Color LaserJet 8500 PS”或“Xerox DocuTech 135 PS2”)。然后通过打印测试页来测试打印设置。
如果您必须使用 Samba 进行共享,您可以添加一个写入列表到smb.conf:
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = no
printable = yes
create mode=0700
write list=@adm root <username>
Run Code Online (Sandbox Code Playgroud)我在这个wiki 上找到的所有上述信息,比我在这里包含的信息更多。希望有帮助!