LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1380|回复: 6

linux下的打印机不能被共享:/usr/lib/cups/backend/smb failed

[复制链接]
发表于 2008-3-22 16:26:28 | 显示全部楼层 |阅读模式
以前都是好的,系统也没有升级,但突然不能共享打印了。
本地能打印。
在win下能添加打印机,但是不能打印。
另外的linux机器通过samba现在也不能打印了,提示为
/usr/lib/cups/backend/smb failed
头都搞大了,请各位老大指教,谢谢!

/var/log/cups/error_log 提示:
D [22/Mar/2008:16:18:53 +0800] cupsdReadClient: 7 POST / HTTP/1.1
D [22/Mar/2008:16:18:53 +0800] cupsdAuthorize: No authentication data provided.
D [22/Mar/2008:16:18:53 +0800] CUPS-Get-Default
D [22/Mar/2008:16:18:53 +0800] CUPS-Get-Default client-error-not-found: No default printer
D [22/Mar/2008:16:18:53 +0800] cupsdProcessIPPRequest: 7 status_code=406 (client-error-not-found)
D [22/Mar/2008:16:18:53 +0800] cupsdReadClient: 7 POST / HTTP/1.1
D [22/Mar/2008:16:18:53 +0800] cupsdAuthorize: No authentication data provided.
D [22/Mar/2008:16:18:53 +0800] CUPS-Get-Printers
D [22/Mar/2008:16:18:53 +0800] cupsdProcessIPPRequest: 7 status_code=0 (successful-ok)
D [22/Mar/2008:16:18:53 +0800] cupsdReadClient: 7 POST / HTTP/1.1
D [22/Mar/2008:16:18:53 +0800] cupsdAuthorize: No authentication data provided.
D [22/Mar/2008:16:18:53 +0800] Get-Printer-Attributes ipp://localhost/printers/ps
D [22/Mar/2008:16:18:53 +0800] cupsdProcessIPPRequest: 7 status_code=0 (successful-ok)
 楼主| 发表于 2008-3-22 16:28:43 | 显示全部楼层
# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Global parameter guest account found in service section!
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = DOMAIN
        server string = %h server
        security = SHARE
        obey pam restrictions = Yes
        passdb backend = tdbsam
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        printcap name = cups
        dns proxy = No
        panic action = /usr/share/samba/panic-action %d
        invalid users = root
        printing = cups
        print command =
        lpq command = %p
        lprm command =

[homes]
        comment = Home Directories
        valid users = %S
        create mask = 0700
        directory mask = 0700
        browseable = No

[printers]
        path = /home/smbprint
        create mask = 0700
        guest only = Yes
        guest ok = Yes
        printable = Yes
        use client driver = Yes
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-22 16:33:47 | 显示全部楼层
cups的设置是按这里的:
4.3. CUPS Configuration

Windows printer drivers format their output for the printer before sending it across the network. You must configure CUPS to accept the pre-formatted output by uncommenting the following line from /etc/cups/mime.convs:

application/octet-stream   application/vnd.cups-raw   0   -

Also uncomment the following line from /etc/cups/mime.types:

application/octet-stream

Now CUPS must be told to allow connections from other machines on the network. Add these lines to /etc/cups/cupsd.conf:

<Location /printers>
AuthType None
Order Deny,Allow
Deny From None
Allow From All
</Location>

As in the Samba configuration, this configuration allows any computer to connect to your printers and is not recommended for computers on untrusted networks. For information about tightening access control to your printers, see the cupsd.conf man page and the CUPS documentation.

Finally, restart cups with the following command:

/etc/init.d/cupsys restart

Your Linux printers should now be shared to Windows PCs on the LAN. Follow the usual steps for adding a network printer to your Windows PCs, and remember to print a test page.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-22 16:35:50 | 显示全部楼层
linux都是debian,etch
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-22 17:14:22 | 显示全部楼层
$ smbclient -L 192.168.1.55 -N
Domain=[DOMAIN] OS=[Unix] Server=[Samba 3.0.24]

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        IPC$            IPC       IPC Service (PRN server)
        SS1210          Printer   SS1210
Domain=[DOMAIN] OS=[Unix] Server=[Samba 3.0.24]

        Server               Comment
        ---------            -------
        PRN                  PRN server
        SERVER               server server

        Workgroup            Master
        ---------            -------
        DOMAIN               SERVER
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-22 21:29:02 | 显示全部楼层
在windows下提示的是:
无法创建打印作业
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-22 21:55:51 | 显示全部楼层
搞定了,原来是权限的问题,将/home/smbprint的权限设成777就行了,唉!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表