今天测试用Linux作打印服务器,为Windows客户端自动安装打印机驱动。按http://www.enterprisenetworkingplanet.com/netsysm/article.php/3621876的步骤一步一步做。做到 cupsaddsmb -H localhost -U root -a -v 这一步出错,提示认证错误。因为我的Linux配置成域成员,Security=ADS,所以把root改成administrator,这次出来的错误是
NT_STATUS_MEDIA_WRITE_PROTECTED making remote directory \W32X86
NT_STATUS_ACCESS_DENIED opening remote file \W32X86/HPDeskjet6600.ppd
NT_STATUS_ACCESS_DENIED opening remote file \W32X86/ps5ui.dll
NT_STATUS_ACCESS_DENIED opening remote file \W32X86/pscript.hlp
NT_STATUS_ACCESS_DENIED opening remote file \W32X86/pscript.ntf
NT_STATUS_ACCESS_DENIED opening remote file \W32X86/pscript5.dll
估计是权限的问题。在网上搜了半天,不管怎么设置目录的权限,修改smb.conf中[print$]的read only、write list等都不行。最后把smb.conf备份下来,从网上拷了个最简单的smb.conf,把[print$]里的path改成自己的,用本地认证,用smbpasswd -a root加root用户,再运行cupsaddsmb -H localhost -U root -a -v,成功后恢复原来的smb.conf,重起samba。