无法在cent OS(生产服务器)中将Windows共享打印机与samba共享连接

时间:2018-11-12 13:47:15

标签: php centos samba thermal-printer

我在 cent OS 服务器上托管了一个电子商务网站。现在,我尝试将订单发票打印到Windows 10中连接的EPOS打印机。我正在使用mike42's ESC/POS-PHP Print Driver来实现此目的。但是我无法使用 samba共享连接到我的打印机。在本地主机中,一切正常。但是在生产服务器中,我无法实现这一目标。

Windows打印机已经共享并连接到USB端口。

smb.conf 文件如下:

[global]
        workgroup = WORKGROUP
        security = user

        wins support = yes
        hostname lookups = yes
        passdb backend = tdbsam

        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw

[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        create mask = 0775
        browseable = Yes
        guest ok = Yes
        read only = no
        public = yes

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @printadmin root
        force group = @printadmin
        create mask = 0664
        directory mask = 0775

这是我要测试的命令:

echo "Hello world" | smbclient "//my_system_name/Printer_name" system_password -U "WORKGROUP\system_user" -C "print -"

通过输入此命令,出现以下错误:

与“ my_system_name”的连接失败(错误NT_STATUS_UNSUCCESSFUL)

非常感谢您能提供的任何帮助。

0 个答案:

没有答案