# Driver install problems for CUPS/SAMBA shared printer.

## MorphiusFaydal

I have a Brother HL-2040 laser printer that I'm trying to set up to be shared over my network.  It prints just fine from the computer that it's plugged into, btw.

I've been following these two guides:

http://gentoo-wiki.com/HOWTO_Native_Windows_Printing_with_CUPS/Samba

http://www.gentoo.org/doc/en/quick-samba-howto.xml

And I've got everything working up to installing the drivers.

On the Gentoo-Wiki one, I can't click that button on one of my Windows PCs.

On the Gentoo.org one, I type "cupsaddsmb -H localhost -U root -h localhost -v HL-2040".  Then it asks me for my root password, which I provide, then it starts scrolling "No Windows printer drivers are installed!".

The printer's name in CUPS is HL-2040.

I have installed:

```

remus ~ # emerge -pv samba cups foomatic-db foomatic-filters foomatic-db-ppds cups-windows clamav

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] net-fs/samba-3.0.24-r3  USE="acl cups oav pam python readline -async -automount -caps -doc -examples -fam -kerberos -ldap -quotas (-selinux) -swat -syslog -winbind" LINGUAS="-ja -pl" 0 kB

[ebuild   R   ] net-print/cups-1.2.10-r1  USE="jpeg nls pam php png ppds samba ssl -X -dbus -ldap -slp -tiff" 0 kB

[ebuild   R   ] net-print/foomatic-db-20060720  0 kB

[ebuild   R   ] net-print/foomatic-filters-3.0.20060720  USE="cups" 0 kB

[ebuild   R   ] net-print/foomatic-db-ppds-20060720  0 kB

[ebuild   R   ] net-print/cups-windows-6.0  0 kB

[ebuild   R   ] app-antivirus/clamav-0.91.2  USE="bzip2 crypt nls -logrotate -mailwrapper -milter (-selinux)" 0 kB

```

My smb.conf:

```

[global]

        netbios name = REMUS

        workgroup = WORKGROUP

        server string = Remus (Samba server %v)

        printcap name = cups

        printing = cups

        load printers = yes

        use client driver = yes

        log file = /var/log/samba/log.%m

        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

        interfaces = lo eth0

        bind interfaces only = yes

        security = share

#       guest account = samba

        guest ok = yes

        vfs object = vscan-clamav

        vscan-clamav: config-file = /etc/samba/vscan-clamav.conf

[print$]

        comment = Printer drivers

        path = /etc/samba/printer

        guest ok = yes

        browseable = yes

        read only = yes

        write list = root

[HL-2040]

        comment = Brother HL-2040 series

        printable = yes

        path = /var/spool/samba

        public = yes

        guest ok = yes

        printer admin = root

[printers]

        comment = All Printers

        browseable = no

        printable = yes

        writeable = no

        public = yes

        guest ok = yes

        path = /var/spool/samba

        printer admin = root

[public]

        comment = Public Files

        browseable = yes

        public = yes

        create mode = 0766

        guest ok = yes

        path = /home/samba/public

        writeable = yes

```

----------

## MorphiusFaydal

< bump > ?

----------

## luche

I'm having the same problem... It would be nice if someone could help us.

I followed the same HOWTO (http://www.gentoo.org/doc/en/quick-samba-howto.xml) to no avail.

----------

## nahpets

I had the same problem as solved it by reading the manpages.   From "man cupsaddsmb":

```

Once  you   have   extracted   the   driver   files,   copy   the   32-bit   drivers   to   the

/usr/share/cups/drivers  directory  and  the  64-bit drivers to the /usr/share/cups/drivers/x64

directory exactly as named below:

           [Windows 2000 and higher]

           cups6.inf (from www.cups.org)

           cups6.ini (from www.cups.org)

           cupsps6.dll (from www.cups.org)

           cupsui6.dll (from www.cups.org)

           ps5ui.dll (from your Windows system)

           pscript.hlp (from your Windows system)

           pscript.ntf (from your Windows system)

           pscript5.dll (from your Windows system)

```

The CUPS Driver for Windows only gives you the cups* files.  You have to get the ps5ui.dll and other files from a Windows box.  Once I obtained these files and put them in /usr/share/cups/drivers, doing

```

# cupsaddsmb -H localhost -h localhost -v -a

```

installed the windows drivers properly.

Also, I didn't need to make an explicit entry for my printer in /etc/samba/smb.conf.  The manpage contains the necessary samba configs.

----------

## MorphiusFaydal

This is what I get when I run that command:

```
Running command: smbclient //localhost/print$ -N -A /var/spool/cups/tmp/46fc2f9a2aca1 -c 'mkdir W32X86;put /var/spool/cups/tmp/46fc2f8ec3bc4 W32X86/HL-2040.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.24]

Server not using user level security and no password supplied.

tree connect failed: NT_STATUS_BAD_NETWORK_NAME

Unable to copy Windows 2000 printer driver files (1)!

```

```
remus ~ # ls -l /usr/share/cups/drivers/

total 1432

-rw-r--r-- 1 root root    803 Aug 23 13:43 cups6.inf

-rw-r--r-- 1 root root     72 Aug 27 15:17 cups6.ini

-rw-r--r-- 1 root root  12568 Aug 27 15:17 cupsps6.dll

-rw-r--r-- 1 root root  13672 Aug 27 15:17 cupsui6.dll

-rw-r--r-- 1 root root 132608 Aug 27 15:17 ps5ui.dll

-rw-r--r-- 1 root root  26038 Aug 27 15:17 pscript.hlp

-rw-r--r-- 1 root root 792644 Aug 27 15:17 pscript.ntf

-rw-r--r-- 1 root root 464384 Aug 27 15:17 pscript5.dll

remus ~ #
```

----------

## nahpets

Did you set the global options properly as described in the wiki?

```

security = user

encrypt passwords = yes

```

----------

## sedorox

May I suggest setting up print$ share, and actually installing the drivers through windows? I've found its worked well for me. I have a HP LJ 2200DN, and a HP PSC 750 setup this way using a samba box as the print server. Works great!

----------

## MorphiusFaydal

 *nahpets wrote:*   

> Did you set the global options properly as described in the wiki?
> 
> ```
> 
> security = user
> ...

 

I set up for 'share' security...

 *sedorox wrote:*   

> May I suggest setting up print$ share, and actually installing the drivers through windows? I've found its worked well for me. I have a HP LJ 2200DN, and a HP PSC 750 setup this way using a samba box as the print server. Works great!

 

How?

----------

