Sharing Printer for Windows from Linux with Samba

Sharing Printer for Windows from Linux –>

smb.conf will be =============>

[global]
        dos charset = ASCII
        display charset = UTF-8
        workgroup = WORKGROUP
        netbios name = PRINT
        security = SHARE
        max xmit = 65535
        deadtime = 15
        socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=16384 SO_RCVBUF=16384
        printcap name = cups
        printing = cups
        log file = /var/log/samba/%m.log

[printers]
        comment = All Printers
        path = /var/tmp
        guest ok = Yes
        printable = Yes
        browseable = yes

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        guest ok = Yes

[Test]
        comment = Test
        path = /var/lib/samba
        read only = No
        guest ok = Yes
        printable = Yes
        printer name = Test
        use client driver = Yes
        oplocks = No

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

/etc/cups/cupsd.conf ===================>

LogLevel debug
SystemGroup sys root
Port 631
Listen /var/run/cups/cups.sock
Browsing Off
DefaultAuthType Basic

<Location />
  Order allow,deny
   Allow from All
</Location>

<Location /admin>
  Order allow,deny
  Allow from All
</Location>

<Location /admin/conf>
  Order allow,deny
   Allow from All
</Location>

Note: If permissions are not proper then you may get “client-error-not-authorized” this error in Samba log.

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

Please uncomment below line from /etc/cups/mime.convs

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

Note : If it is commented then you may get “client-error-document-format-not-supported” this error in samba log.

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

Now restart cups and add printer in Windows.

Good Luck !!! 🙂

Neelesh Gurjar has written 122 articles

Leave a Reply