很遗憾,您没有提供足够详细的有关您的特定设置的信息。所以我会努力考虑几个潜在的问题,并给出如何克服它们的提示:
我。
您是否为共享的 Windows 打印机使用了正确的共享名称?
要找出答案,请使用以下命令:
$ smbtree -U windowsusername
您可能会看到类似以下的输出:
WORKGROUP
\\MURUGA-PC
\\MURUGA-PC\G
\\MURUGA-PC\Z
\\MURUGA-PC\Public
\\MURUGA-PC\print$ Printer Drivers
\\MURUGA-PC\EPSON Stylus CX8400 Series EPSON Stylus CX8400 Series
换句话说:您的打印机的共享名称可能包含空格。但是您不能在 CUPS 的设备 URI 中使用空格!现在呢?
简单:(1) 在 Windows 端重命名共享名称。 (2) 或者改用%20 转义空格:
smb://muruga:mysecretpassword@muruga-pc/EPSON%20Stylus%20CX8400%20Serie
二。
您的 Windows XP 是否有机会使用 Kerberos 身份验证?例如,因为它是 Active Directory 环境的一部分?那么你应该参考cups.org上的这份文件:
Kerberos 身份验证不适用于用户名/密码,它使用“票证”。
III.
否则,如果您的 Windows XP 机器是“标准”域的一部分,您可能会通过放弃 smb://username:password@ip-address-of-windows/printer_name 的设备 URI 并改用它来获得更大的成功:
smb://username:password@domain_name/windows_host/printer_Name
您使用的用户名必须是在 Windows 上安装打印机的 Windows 用户名(及其密码)!
IV.
或者,您可以通过使用 IPP 打印到 Windows 来获得成功(尽管 XP 需要安装支持 IPP 的扩展,由 Microsoft 提供)。请注意,MS 对其设备 URI 使用非标准语法(使用端口 80 或 443),并且其 IPP 版本仍为 1.0(始终处于“草稿”状态,并且从未将其发布为官方版本) IETF):
DeviceURI https://mywindowsprintserver/printers/printername/.printer
或
DeviceURI http://mywindowsprintserver/printers/printername/.printer
对于此打印机的用户名/密码验证,您需要
-
AuthInfoRequired username,password 在/etc/cups/printers.conf 和
-
DefaultAuthType Basic 在cupsd.conf。
要使用 Kerberos,您需要
-
AuthInfoRequired Negotiate 在/etc/cups/printers.conf 和
-
DefaultAuthType Negotiate 在cupsd.conf。
如果整个设置是在具有专用 LAN/WLAN 的家庭中,您可能需要考虑删除所有访问控制(首先在 Windows 打印服务器端):
-
AuthInfoRequired None 在/etc/cups/printers.conf 和
-
DefaultAuthType None 在cupsd.conf。
如果您的问题是您的密码包含'@' 字符,请尝试以下操作:
smb://username:'p@ssword'@domain_name/windows_host/printer_Name
或
smb://username:p%40ssword@domain_name/windows_host/printer_Name