[Samba] Printing from Win2000

Kurt Pfeifle kpfeifle at danka.de
Fri Oct 24 20:13:34 GMT 2003


> [Samba] Printing from Win2000
> 
>     * To: samba at listsdotsambadotorg
>     * Subject: [Samba] Printing from Win2000
>     * From: Garrett <GaRogers at studentdotjjcdotedu>
>     * Date: Fri, 24 Oct 2003 01:56:58 -0500
> 
> Hello,
>    I have just started using samba a couple of weeks ago.  I am using 
> Slackware 9.1 and windows 2000.  i can see everything.  on my windows box i 
> can see my linux box and visa versa.  but i have a HP deskjet 932c on my 
> linux box and i want to be able to print from windows.  windows can see the 
> printer in network neighborhood but it says that it is unable to connect 
> access denied.  i have set the drivers right and everything.  here is my 
> smb.conf:
> 
> [global]
> 	netbios name = MYSERVER
> 	server string = "Is It Not Nifty?"
> 	encrypt passwords = Yes
> 	log file = /var/log/samba.log
> 	socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
> 	printcap name = cups
> 	wins support = Yes
> 	hosts allow = 192.168.1.100

I suspect this setting could be a guilty one, should you try to
access your Samba from a different host than 192.168.1.100

> 	printing = cups
> 

What does "testparm -v | grep security" (hit ENTER twice) return?
If it is "security = share", change it to "security = user"....

> [public]
> 	path = /home/garrett
> 	read only = No
> 	guest ok = Yes
> 
> [printers]
> 	path = /var/spool/samba
> 	guest ok = Yes
> 	printable = Yes
> 	print command = /usr/bin/lpr -P%p -r %s

If you have "printing = cups" and "printcap = cups", correct
"builtin" print commands should automatically be used. Your
manually set ones are ignored.

> 	browseable = No
> 
> [HPDeskjet]
> 	comment = HP DeskJet 932C, hpijs
> 	path = /home/garrett/hpspool
> 	read only = No
> 	guest ok = Yes
> 	printable = Yes
> 	print command = /usr/bin/lpr -P%p -r %s
> 	printer name = Garrett
> 	oplocks = No
> 
> And when i type this command lpstat i get this:
> 

To test if you really have the *driver* for that printer ready when
a clients tries to "Connect...", use these commands:

   rpcclient -Uroot%[smbpassword] -c enumdrivers localhost
   rpcclient -Uroot%[smbpassword] -c enumprinters localhost


(where "[smbpassword]" must first have been set with the
"smbpasswd -a root" command...)

> garrett at garrett:~$ lpstat
> Printer 'Garrett at localhost' - cannot open connection - No such file or 
> directory
> Make sure the remote host supports the LPD protocol
> and accepts connections from this host and from non-privileged (>1023) ports
> Printer 'Garrett at localhost' - cannot open connection - No such file or 
> directory
> Make sure the remote host supports the LPD protocol
> and accepts connections from this host and from non-privileged (>1023) ports
> 

This means that you are running the "lpstat" command version
shipping with LPRng, not the CUPS one!

Your installation is broken.

You need to decide: Do you want to use CUPS or LPRng? Remove the other
one and re-install the desired package. Try again. (If you are trying
to run both on the sam box, make sure your RedHat/Mandrake/Debian
"alternatives" system is working correctly and that you have enabled
the print subsystem you actually want to use at this moment.)


> Please help me if anyone knows what the problem is.  Thanks a alot!
> 
> 




More information about the samba mailing list