[Samba] Printing from Win2000

2003-10-24 Thread Garrett
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
printing = cups

[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
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:

[EMAIL PROTECTED]:~$ lpstat
Printer '[EMAIL PROTECTED]' - 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 '[EMAIL PROTECTED]' - 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

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

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Printing from Win2000

2003-10-24 Thread Kurt Pfeifle
[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!


--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Printing from Win2000 to Linux

2003-01-18 Thread Joel Hammer
I don't understand your print shares. That doesn't mean they are
incorrect, it just means I don't use this method for configuring my
smb.conf.

Here is the easiest way I know.

If you can print fine from the linux box, that means that the linux box can
handle postscript files, since postscript is THE printing language on linux.
Therefore, send all your windows files to the same queue you print from in
linux. And, on the windows box, select HP laserjet III plus as your driver.
This is a generic postscript driver, that is, it will convert your document
into a generic postscript file. This file can be read with gv, for
example.  The file is then transferred to the spool directory specified
in your print share, whence it is printed with lpr.

I hate to depend on automatic, behind the scenes tricks to solve my
printing problems, since you will never stop having printing problems and
you might as well understand what is happening.

Here is what I do. I use lprng but cups should not be too different, I would
hope. There are some permissions problems in cups that I haven't seen in
lprng.


[global]
encrypt passwords = yes 
netbios name = HAMMER2
interfaces = 192.168.0.2 
security = SHARE
guest account = ftp

[ps]
path = /tmp
read only = No
create mask = 0700
guest ok = yes
hosts allow = 192.168.
printable = Yes
printing = lprng
print command = echo %J %p %s/tmp/junkJ;\
   a=`echo '%J' | sed s/^.*- //` ;\
   echo This is truncated $a  /tmp/junkJ;\
   /usr/bin/lpr -Pps  -J$a  %s;\
   rm %s
lpq command = /usr/bin/lpq -Pps
lprm command = /usr/bin/lprm -Pps %j
lppause command = /usr/sbin/lpc hold ps %j
lpresume command = /usr/sbin/lpc release ps %j
share modes = No
use client driver = yes 


I explicitly define all the printing commands. Just paranoid,
I guess.  It really isn't needed, if everything is working according to
plan. Note: printing = parameter is a share level parameter. 

man smb.conf
:/   printing

I don't think share modes does anything but I am too lazy to find out.

Just be sure the ps queue can handle postscript jobs, and you should be
close to a solution.

I won't give you my printcap file, since I use lprng and that might have
a different format from cups, for all I know.

Joel





So, On Sat, Jan 18, 2003 at 09:37:56AM +0100, Michael Herber wrote:
 I have two computers here - one with Win2000 and the other with SuSE
 8.1. My goal is that I can print from Win to my printer connected on the
 Linux machine. 
 Now I tried quite a few things but nothing will work. First of all, here
 my smb.conf:
 
 # Samba config file created using SWAT
 # from 0.0.0.0 (0.0.0.0)
 # Date: 2003/01/11 16:17:19
 
 # Global parameters
 [global]
   security = share
   guest account = nobody
   guest ok = Yes
   printing = cups
   printer name = lp
   veto files = /*.eml/*.nws/riched20.dll/*.{*}/
   load printers = Yes
 
 [homes]
   comment = Home Directories
   valid users = %S
   read only = Yes
   guest ok = No
   veto files =
   browseable = No
   fstype = FAT
 
 [printers]
   comment = All Printers
   browseable = yes
   public = yes
   guest ok = yes
   writable = yes
   printable = yes
   path = /var/spool/samba
 
 [print$]
   comment = Printer Drivers
   browsable = yes
   guest ok = yes
   read only = yes
 
 I know that there are two possibilities to install the printer on the
 Win machine:
 
 1. When I try to install it as local printer, I select Standard
 TCP/IP-Port and enter the ip of the Linux computer e.g.
 129.168.0.20).  The next dialogue tells me that the device can't be
 found an I can select the type of device (e.g. generic network card).
 So I stopped here because oviously, this doesn't work correctly.
 
 2. As network printer. Windows finds my Linux, even the printer, but
 tells me that the server doesn't offer a correct driver for the printer.
 I can then install a driver on the local machine, that means the Windows
 one, right? Now I downloaded the right driver and select the .inf-file.
 But then a dialogue tells me that the driver isn't the correct one for
 this version of windows or not available. So no chance here too.
 
 But I know from other users in the net that it is possible to print from
 Win 2000 to Linux correctly. So is somebody here who can help me till
 this really works?
 
 
 
 
 -- 
 To unsubscribe from this list go to the following URL and read the
 instructions:  http://lists.samba.org/mailman/listinfo/samba
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba



Re: [Samba] Printing from Win2000 to Linux

2003-01-18 Thread Joel Hammer
One interesting trick. To see which commands smbd supports for printing,
run:

strings `which smbd` | grep command

You will see commands to pause the entire queue, which I have left out of my
share. If you wanted to fine tune a queue, you could define all these
commands to do just what you like. For example, you might like to make
the printing command also mail a message saying that a user has printed a
file.

This could be made part of your printing command:

echo user %U has printed a file %J from client %m | mail -s JobDone administrator

You might also make pausing the queue impossible from a samba client. So,
you could define:

queuepause command = echo You cannot do this | smbclient -M %m
(I haven't tried this one.)

Joel


 
On Sat, Jan 18, 2003 at 08:41:39AM -0500, Joel Hammer wrote:
 I don't understand your print shares. That doesn't mean they are
 incorrect, it just means I don't use this method for configuring my
 smb.conf.
 
 Here is the easiest way I know.
 
 If you can print fine from the linux box, that means that the linux box can
 handle postscript files, since postscript is THE printing language on linux.
 Therefore, send all your windows files to the same queue you print from in
 linux. And, on the windows box, select HP laserjet III plus as your driver.
 This is a generic postscript driver, that is, it will convert your document
 into a generic postscript file. This file can be read with gv, for
 example.  The file is then transferred to the spool directory specified
 in your print share, whence it is printed with lpr.
 
 I hate to depend on automatic, behind the scenes tricks to solve my
 printing problems, since you will never stop having printing problems and
 you might as well understand what is happening.
 
 Here is what I do. I use lprng but cups should not be too different, I would
 hope. There are some permissions problems in cups that I haven't seen in
 lprng.
 
 
 [global]
 encrypt passwords = yes 
   netbios name = HAMMER2
   interfaces = 192.168.0.2 
   security = SHARE
   guest account = ftp
 
 [ps]
   path = /tmp
   read only = No
   create mask = 0700
   guest ok = yes
   hosts allow = 192.168.
   printable = Yes
   printing = lprng
   print command = echo %J %p %s/tmp/junkJ;\
a=`echo '%J' | sed s/^.*- //` ;\
  echo This is truncated $a  /tmp/junkJ;\
/usr/bin/lpr -Pps  -J$a  %s;\
rm %s
   lpq command = /usr/bin/lpq -Pps
   lprm command = /usr/bin/lprm -Pps %j
   lppause command = /usr/sbin/lpc hold ps %j
   lpresume command = /usr/sbin/lpc release ps %j
   share modes = No
 use client driver = yes 
 
 
 I explicitly define all the printing commands. Just paranoid,
 I guess.  It really isn't needed, if everything is working according to
 plan. Note: printing = parameter is a share level parameter. 
 
 man smb.conf
 :/   printing
 
 I don't think share modes does anything but I am too lazy to find out.
 
 Just be sure the ps queue can handle postscript jobs, and you should be
 close to a solution.
 
 I won't give you my printcap file, since I use lprng and that might have
 a different format from cups, for all I know.
 
 Joel
 
 
 
 
 
 So, On Sat, Jan 18, 2003 at 09:37:56AM +0100, Michael Herber wrote:
  I have two computers here - one with Win2000 and the other with SuSE
  8.1. My goal is that I can print from Win to my printer connected on the
  Linux machine. 
  Now I tried quite a few things but nothing will work. First of all, here
  my smb.conf:
  
  # Samba config file created using SWAT
  # from 0.0.0.0 (0.0.0.0)
  # Date: 2003/01/11 16:17:19
  
  # Global parameters
  [global]
  security = share
  guest account = nobody
  guest ok = Yes
  printing = cups
  printer name = lp
  veto files = /*.eml/*.nws/riched20.dll/*.{*}/
  load printers = Yes
  
  [homes]
  comment = Home Directories
  valid users = %S
  read only = Yes
  guest ok = No
  veto files =
  browseable = No
  fstype = FAT
  
  [printers]
  comment = All Printers
  browseable = yes
  public = yes
  guest ok = yes
  writable = yes
  printable = yes
  path = /var/spool/samba
  
  [print$]
  comment = Printer Drivers
  browsable = yes
  guest ok = yes
  read only = yes
  
  I know that there are two possibilities to install the printer on the
  Win machine:
  
  1. When I try to install it as local printer, I select Standard
  TCP/IP-Port and enter the ip of the Linux computer e.g.
  129.168.0.20).  The next dialogue tells me that the device can't be
  found an I can select the type of device (e.g. generic network card).
  So I stopped here because oviously, this doesn't work correctly.
  
  2. As network printer. Windows finds my Linux, even the printer, but
  tells me that the server doesn't offer a correct driver for the