# gentoo print server(samba+cups) + windows xp client

## .hesoez

hi,

i'm trying to set up a gentoo print server for windows xp machine's but i can't get the automatic driver install to work.

i followed the printing guide to set up the printer, no problem there.

then i followed the cups/samba guide and got stuck at the windows driver install.

i installed the printer drivers downloaded from the cups site (cups-samba-5.0rc3.tar.gz) with 

```
./cups-samba.install
```

```
jim@ls /usr/share/cups/drivers/

cups5.hlp  cupsdrv5.dll  cupsui5.dll
```

but when i run

```
root@hercules # cupsaddsmb -H localhost -U root -h localhost -v deskjet5652

Password for root required to access localhost via SAMBA:

Running command: rpcclient localhost -N -U'root%lpadmin' -c 'setdriver deskjet5652 deskjet5652'

Succesfully set deskjet5652 to driver deskjet5652.

```

i don't see the installation of the drivers

smb.conf and cupsd.conf are edited as the howto's indicates

any thoughts

thxLast edited by .hesoez on Sat Jun 04, 2005 7:44 pm; edited 1 time in total

----------

## redfox

Not sure if this helps, but here's how I have it working here. I am not using Samba to share my printer. Instead I opened up CUPS on the network. You have a couple of options. When you set the printer up in CUPS, you can make it a raw printer and then use the windows drivers on the windows side. You also have to go and edit some things in the cups config to make this work, but you get a working printer, plus with windows using its own drivers, you have all the features for the printer, or at least you should. The other option it to set it up with a driver in Linux, then you have to add it as a RAW printer in Windows, I have yet figured out how to do this other than using generic/text only in XP, but you can't do any color or graphics, so it bites. And yes, you do have to modify those config files, I think. I'm not too sure. It's not as bad as it sounds, but it works. Oh, almost forgot, when you add it in Windows, be sure to tell it it's a network printer with http://hostname:631/printers/printername .Hope this helps. You can find this also in the Gentoo Quick Start CUPS documentation <a href="http://http://www.gentoo.org/doc/en/printing-howto.xml">here</a>. Plus, it should work wiht any OS going this route, not sure though.

----------

## .hesoez

i know, i have it installed like that but i would like to use samba.

it's a lot easier for people who connect their windows (mostly xp)machine to my local network.

i can see the printer in "my network places" but when i click it, it can't find the drivers needed to install the network printer in windows.

everything works except for the 'automated windows driver install' and that's why i want to use printing through samba.

grtz

----------

## chovy

I'm having the exact same problem. It's skipping the entire "smbclient..." process of copying the drivers over.

 *Quote:*   

> spring drivers # cupsaddsmb -H spring -U root -h spring -v HPDeskJet3820
> 
> Password for root required to access spring via SAMBA:
> 
> Running command: rpcclient spring -N -U'root%xxxxxxx' -c 'setdriver HPDeskJet3820 HPDeskJet3820'
> ...

 

----------

## tutaepaki

I had this same problem up until 15 minutes ago.  :Very Happy: 

What I had to do, was to download the Adobe postscript print drivers 

http://www.adobe.com/support/downloads/main.html

And using a windows machine, extract the files, and then grab the 4 ps driver files and

put them in the /usr/share/cups/drivers directory on my printer server. Then I had to

rename them all the lower case.

When I re-ran the cupsaddsmb program this time, it did all the SAMBA stuff too, and my Windows

computer can now connect to, and print to, my Lexmark printer on the gentoo box.

----------

## chovy

i followed the instructions from another thread.

Worked ok.

----------

## .hesoez

my smb.conf

```
[global]

server string =

netbios name = Hercules

workgroup = kot

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

max log size = 50

security = user

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192

interfaces = lo eth0

bind interfaces only = yes

hosts allow = 127.0.0.1 192.168.0.0/24

hosts deny = 0.0.0.0/0

encrypt passwords = yes

guest account = nobody

guest ok = yes

passdb backend = tdbsam

printcap name = cups

printing = cups

load printers = yes

vfs object = vscan-clamav

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

[print$]

comment = Printer Drivers

path = /etc/samba/drivers

browseable = yes

read only = yes

guest ok = no

write list = root

[deskjet5652]

comment = Hewlett-Packard DeskJet 5650c

printable = yes

path = /var/spool/samba

public = yes

printer admin = root

[printers]

comment = All Printers

browseable = no

printable = yes

writable = no

public = yes

path = /var/spool/samba

printer admin = root

[iso]

path = /mnt/data/isos

read only = yes
```

added user root with smbpasswd

copied postscript drivers to /usr/share/cups/drivers

```
cupsaddsmb -H localhost -U root -h localhost -v deskjet5652 Password for root required to access localhost via SAMBA: Running command: smbclient //localhost/print\$ -N -U'root%passwd' -c 'mkdir W 32X86;put /var/spool/cups/tmp/42f880335bf36 W32X86/deskjet5652.ppd;put /usr/sha re/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.n tf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'

Domain=[HERCULES] OS=[Unix] Server=[Samba 3.0.14a]

putting file /var/spool/cups/tmp/42f880335bf36 as \W32X86/deskjet5652.ppd (5700 .8 kb/s) (average 5700.9 kb/s)

putting file /usr/share/cups/drivers/ps5ui.dll as \W32X86/ps5ui.dll (2377.4 kb/ s) (average 2610.6 kb/s)

putting file /usr/share/cups/drivers/pscript.hlp as \W32X86/pscript.hlp (552.8 kb/s) (average 1691.6 kb/s)

putting file /usr/share/cups/drivers/pscript.ntf as \W32X86/pscript.ntf (1277.3  kb/s) (average 1337.5 kb/s)

putting file /usr/share/cups/drivers/pscript5.dll as \W32X86/pscript5.dll (1429 .3 kb/s) (average 1365.5 kb/s)

Running command: rpcclient localhost -N -U'root%passwd' -c 'adddriver "Window s NT x86" "deskjet5652:pscript5.dll:deskjet5652.ppd:ps5ui.dll:pscript.hlp:NULL: RAW:pscript.ntf"'

result was WERR_ACCESS_DENIED
```

i've been searching google for 2 days but haven't found a sollution yet

any ideas?

----------

## .hesoez

it was the clamav scanner that denied the access so now i have succesfully finished the driver installation.

in windows however it still says that the server does not have the correct driver installed.

maybe my printer (HP deskjet 5652) is not supported by those drivers, is there a way to extract the specific drivers from windows and install them with cupsaddsmb?

----------

