请问如何使用SAMBA实现LINUX远程打印

由 cjsteven 在 01-24-2003 16:13 发表:

请问如何使用SAMBA实现LINUX远程打印

我不要使用PRINT TOOLS,我想直接修改那些配置文件就可以了?

因为我没有X windows


由 shihao 在 01-28-2003 11:13 发表:


请参考

=====================================

[print$]

path = /usr/local/samba/printers

guest ok = yes

browseable = yes

read only = yes

; 由于把它配置为只读,所以需要一个‘write list’。检查文件

; 系统权限以确保该账号可以向这个共享拷贝文件。如果这个账号

; 不是root账号,则应该作为‘printer admin’。

write list = ntadmin

你可以在[print$]共享项下为每一种希望支持的平台建立对应的子目录。

[print$]-----

|-W32X86 ; "Windows NT x86"

|-WIN40 ; "Windows 95/98"

|-W32ALPHA ; "Windows NT Alpha_AXP"

|-W32MIPS ; "Windows NT R4000"

|-W32PPC ; "Windows NT PowerPC"

为现有打印机设定驱动程序

要是多台打印机都共用驱动程序的话,就可以用rpcclient的setdriver命令对已安装的驱动程序进行关联。例如:

$ rpcclient pogo -U root%secret -c "enumdrivers"

Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]

[Windows NT x86]

Printer Driver Info 1:

Driver Name: [HP LaserJet 4000 Series PS]

Printer Driver Info 1:

Driver Name: [HP LaserJet 2100 Series PS]

Printer Driver Info 1:

Driver Name: [HP LaserJet 4Si/4SiMX PS]

$ rpcclient pogo -U root%secret -c "enumprinters"

Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]

flags:[0x800000]

name:[\\POGO\hp-print]

description:[POGO\\POGO\hp-print,NO DRIVER AVAILABLE FOR THIS PRINTER,]

comment:[]

$ rpcclient pogo -U root%secret \

> -c "setdriver hp-print "HP LaserJet 4000 Series PS""

Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]

Successfully set hp-print to driver HP LaserJet 4000 Series PS.

通过Windows NT APW添加新打印

缺省情况下,Samba在“打印机”文件夹中会提供smb.conf文件定义的所有共享打印机。同时,如果满足以下条件,就会在该文件夹中提供添加打印机向导的图标:

连接的用户可以用管理权限(如root账号或printer admin)调用OpenPrinterEx(\\server)。

指定选项show add printer wizard = yes (缺省值)。

要用APW在Samba服务器上添加打印机,必须定义add printer command选项,这个选项所指定的程序也必须可以用来向系统(例如/etc/printcap或相应的文件)及smb.conf添加打印机。

当客户端使用APW图标添加的共享打印机不存在时,smbd会执行add printer command并重新分析smb.conf文件,然后查找新的打印机共享。如果该共享还未定义,则向客户端返回“拒绝访问”出错信息。注意,add printer program是以连接的用户身份执行的,它并

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus