Printing with Samba

This is a discussion on Printing with Samba within the Linux Networking forums, part of the Linux Forums category; I have just replaced my Epson multifunction with one by Brother. The Epson went well with installed drivers, and I ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-18-2007
Doug Laidlaw
 
Posts: n/a
Default Printing with Samba

I have just replaced my Epson multifunction with one by Brother. The Epson
went well with installed drivers, and I was able to print to it from my
wife's laptop (Windows XP) using Samba, winsteng.exe and the PPD file.

Drivers for the Brother MFC are a download from Brother's Web site, but
winsteng.exe didn't like the PPD file, and the Company's Support line tell
me that winsteng.exe is not supported.

Can I tell the laptop to use the downloaded driver on my Linux box under
Samba? If so, how?

TIA,

Doug.
--
Be wisely worldly, be not worldly wise.
- Francis Quarles.

Reply With Quote
  #2 (permalink)  
Old 07-18-2007
Robert Harris
 
Posts: n/a
Default Re: Printing with Samba

Doug Laidlaw wrote:
> I have just replaced my Epson multifunction with one by Brother. The Epson
> went well with installed drivers, and I was able to print to it from my
> wife's laptop (Windows XP) using Samba, winsteng.exe and the PPD file.
>
> Drivers for the Brother MFC are a download from Brother's Web site, but
> winsteng.exe didn't like the PPD file, and the Company's Support line tell
> me that winsteng.exe is not supported.
>
> Can I tell the laptop to use the downloaded driver on my Linux box under
> Samba? If so, how?
>
> TIA,
>
> Doug.


Yes you can - you need cupsaddsmb which is part of the cups distribution.

Robert
Reply With Quote
  #3 (permalink)  
Old 07-19-2007
Doug Laidlaw
 
Posts: n/a
Default Re: Printing with Samba

Robert Harris wrote:

> Doug Laidlaw wrote:
>> I have just replaced my Epson multifunction with one by Brother. The
>> Epson went well with installed drivers, and I was able to print to it
>> from my wife's laptop (Windows XP) using Samba, winsteng.exe and the PPD
>> file.
>>
>> Drivers for the Brother MFC are a download from Brother's Web site, but
>> winsteng.exe didn't like the PPD file, and the Company's Support line
>> tell me that winsteng.exe is not supported.
>>
>> Can I tell the laptop to use the downloaded driver on my Linux box under
>> Samba? If so, how?
>>
>> TIA,
>>
>> Doug.

>
> Yes you can - you need cupsaddsmb which is part of the cups distribution.
>
> Robert


Thanks. Still playing with it. I have several HOWTOs, and they are all
different. One gives a procedure identical to the one with cupsaddsmb,
another says that cupsaddsmb works only with the printers listed in the
docs. winsteng.exe wanted a "Level 2" ppd file. It seems to be more for
Win98, but it ran the Epson under XP. Thankfully, the config is used only
rarely.

Doug.
--
Perhaps the most important thing we give each other is our attention.
-- Dr R. N. Remen.

Reply With Quote
  #4 (permalink)  
Old 07-19-2007
Robert Harris
 
Posts: n/a
Default Re: Printing with Samba

Doug Laidlaw wrote:
> Robert Harris wrote:
>
>> Doug Laidlaw wrote:
>>> I have just replaced my Epson multifunction with one by Brother. The
>>> Epson went well with installed drivers, and I was able to print to it
>>> from my wife's laptop (Windows XP) using Samba, winsteng.exe and the PPD
>>> file.
>>>
>>> Drivers for the Brother MFC are a download from Brother's Web site, but
>>> winsteng.exe didn't like the PPD file, and the Company's Support line
>>> tell me that winsteng.exe is not supported.
>>>
>>> Can I tell the laptop to use the downloaded driver on my Linux box under
>>> Samba? If so, how?
>>>
>>> TIA,
>>>
>>> Doug.

>> Yes you can - you need cupsaddsmb which is part of the cups distribution.
>>
>> Robert

>
> Thanks. Still playing with it. I have several HOWTOs, and they are all
> different. One gives a procedure identical to the one with cupsaddsmb,
> another says that cupsaddsmb works only with the printers listed in the
> docs. winsteng.exe wanted a "Level 2" ppd file. It seems to be more for
> Win98, but it ran the Epson under XP. Thankfully, the config is used only
> rarely.
>
> Doug


"man cupsaddsmb" tells you more or less the whole story.

Robert
Reply With Quote
  #5 (permalink)  
Old 07-20-2007
Doug Laidlaw
 
Posts: n/a
Default Re: Printing with Samba

Robert Harris wrote:

> Doug Laidlaw wrote:
>> Robert Harris wrote:
>>
>>> Doug Laidlaw wrote:
>>>> I have just replaced my Epson multifunction with one by Brother. The
>>>> Epson went well with installed drivers, and I was able to print to it
>>>> from my wife's laptop (Windows XP) using Samba, winsteng.exe and the
>>>> PPD file.
>>>>
>>>> Drivers for the Brother MFC are a download from Brother's Web site, but
>>>> winsteng.exe didn't like the PPD file, and the Company's Support line
>>>> tell me that winsteng.exe is not supported.
>>>>
>>>> Can I tell the laptop to use the downloaded driver on my Linux box
>>>> under
>>>> Samba? If so, how?
>>>>
>>>> TIA,
>>>>
>>>> Doug.
>>> Yes you can - you need cupsaddsmb which is part of the cups
>>> distribution.
>>>
>>> Robert

>>
>> Thanks. Still playing with it. I have several HOWTOs, and they are all
>> different. One gives a procedure identical to the one with cupsaddsmb,
>> another says that cupsaddsmb works only with the printers listed in the
>> docs. winsteng.exe wanted a "Level 2" ppd file. It seems to be more for
>> Win98, but it ran the Epson under XP. Thankfully, the config is used
>> only rarely.
>>
>> Doug

>
> "man cupsaddsmb" tells you more or less the whole story.
>
> Robert


Thanks Robert. Leave it with me for a while.

Doug.
--
It is the mark of an educated mind to be able to entertain a thought without
accepting it.
- Aristotle.

Reply With Quote
  #6 (permalink)  
Old 07-20-2007
Doug Laidlaw
 
Posts: n/a
Default Re: Printing with Samba

Robert Harris wrote:

> Doug Laidlaw wrote:
>> Robert Harris wrote:
>>
>>> Doug Laidlaw wrote:
>>>> I have just replaced my Epson multifunction with one by Brother. The
>>>> Epson went well with installed drivers, and I was able to print to it
>>>> from my wife's laptop (Windows XP) using Samba, winsteng.exe and the
>>>> PPD file.
>>>>
>>>> Drivers for the Brother MFC are a download from Brother's Web site, but
>>>> winsteng.exe didn't like the PPD file, and the Company's Support line
>>>> tell me that winsteng.exe is not supported.
>>>>
>>>> Can I tell the laptop to use the downloaded driver on my Linux box
>>>> under
>>>> Samba? If so, how?
>>>>
>>>> TIA,
>>>>
>>>> Doug.
>>> Yes you can - you need cupsaddsmb which is part of the cups
>>> distribution.
>>>
>>> Robert

>>
>> Thanks. Still playing with it. I have several HOWTOs, and they are all
>> different. One gives a procedure identical to the one with cupsaddsmb,
>> another says that cupsaddsmb works only with the printers listed in the
>> docs. winsteng.exe wanted a "Level 2" ppd file. It seems to be more for
>> Win98, but it ran the Epson under XP. Thankfully, the config is used
>> only rarely.
>>
>> Doug

>
> "man cupsaddsmb" tells you more or less the whole story.
>
> Robert


Doing it strictly according to the manpage, and using the Cups drivers, I
get an error message from cupsaddsmb -v -a:

Running command:
smbclient ///var/run/cups/cups.sock/print$ -N -A /root/tmp/46a062b152080 -c 'mkdir
W32X86;put /root/tmp/46a062aaab486
W32X86/MFC240C.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'
Unknown parameter encountered: "hosts equiv"
Ignoring unknown parameter "hosts equiv"
Connection to failed

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

I am a bit puzzled by the [Windows etc] labels for the file listings on the
man page. They look like paragraphs on an INI file, and have no place in a
directory, so I simply ignored them.

Doug.


--
Intuition is how a woman knows for sure without knowing for certain.
- W.G.P.

Reply With Quote
  #7 (permalink)  
Old 07-20-2007
Robert Harris
 
Posts: n/a
Default Re: Printing with Samba

Doug Laidlaw wrote:
> Robert Harris wrote:
>
>> Doug Laidlaw wrote:
>>> Robert Harris wrote:
>>>
>>>> Doug Laidlaw wrote:
>>>>> I have just replaced my Epson multifunction with one by Brother. The
>>>>> Epson went well with installed drivers, and I was able to print to it
>>>>> from my wife's laptop (Windows XP) using Samba, winsteng.exe and the
>>>>> PPD file.
>>>>>
>>>>> Drivers for the Brother MFC are a download from Brother's Web site, but
>>>>> winsteng.exe didn't like the PPD file, and the Company's Support line
>>>>> tell me that winsteng.exe is not supported.
>>>>>
>>>>> Can I tell the laptop to use the downloaded driver on my Linux box
>>>>> under
>>>>> Samba? If so, how?
>>>>>
>>>>> TIA,
>>>>>
>>>>> Doug.
>>>> Yes you can - you need cupsaddsmb which is part of the cups
>>>> distribution.
>>>>
>>>> Robert
>>> Thanks. Still playing with it. I have several HOWTOs, and they are all
>>> different. One gives a procedure identical to the one with cupsaddsmb,
>>> another says that cupsaddsmb works only with the printers listed in the
>>> docs. winsteng.exe wanted a "Level 2" ppd file. It seems to be more for
>>> Win98, but it ran the Epson under XP. Thankfully, the config is used
>>> only rarely.
>>>
>>> Doug

>> "man cupsaddsmb" tells you more or less the whole story.
>>
>> Robert

>
> Doing it strictly according to the manpage, and using the Cups drivers, I
> get an error message from cupsaddsmb -v -a:
>
> Running command:
> smbclient ///var/run/cups/cups.sock/print$ -N -A /root/tmp/46a062b152080 -c 'mkdir
> W32X86;put /root/tmp/46a062aaab486
> W32X86/MFC240C.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'
> Unknown parameter encountered: "hosts equiv"
> Ignoring unknown parameter "hosts equiv"


That is an obsolete directive in your smb.conf file

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


You have a permissions problem somewhere:

1. note that "security = share" doesn't work with cupsaddsmb
2. make sure that you can write in the [print$] section of your smb.conf
file ("write list = root"), at least while you are doing cupsaddsmb.

There is a chapter in the samba HOWTO book (at:
<http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/CUPS-printing.html>
) which discusses possible problems although it is not completely up to
date.

It really does work.

Robert

>
> I am a bit puzzled by the [Windows etc] labels for the file listings on the
> man page. They look like paragraphs on an INI file, and have no place in a
> directory, so I simply ignored them.
>
> Doug.
>
>

Reply With Quote
  #8 (permalink)  
Old 07-21-2007
Doug Laidlaw
 
Posts: n/a
Default Re: Printing with Samba

Robert Harris wrote:

>> Doing it strictly according to the manpage, and using the Cups drivers, I
>> get an error message from cupsaddsmb -v -a:
>>
>> Running command:
>> smbclient ///var/run/cups/cups.sock/print$ -N -A /root/tmp/46a062b152080
>> -c 'mkdir W32X86;put /root/tmp/46a062aaab486
>> W32X86/MFC240C.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'
>> Unknown parameter encountered: "hosts equiv"
>> Ignoring unknown parameter "hosts equiv"

>
> That is an obsolete directive in your smb.conf file
>
>> Connection to Â*failed
>>
>> Unable to copy Windows 2000 printer driver files (1)!

>
> You have a permissions problem somewhere:
>
> 1. note that "security = share" doesn't work with cupsaddsmb
> 2. make sure that you can write in the [print$] section of your smb.conf
> file ("write list = root"), at least while you are doing cupsaddsmb.
>
> There is a chapter in the samba HOWTO book (at:
>

<http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/CUPS-printing.html>
> ) which discusses possible problems although it is not completely up to
> date.
>
> It really does work.
>
> Robert
>


Thank you for the reference to Chapter 22. It contained a typical output of
cupsaddsmb -v. Comparing it with what I got, the line

Connection to failed

should be:

added interface...

My smb.conf is a bit of a synthesis. The original as installed by the
package was the heavily commented default one, so I replaced it with the one
in man cupsaddsmb with a few extra parameters. The "hosts equiv" parameter
came from a precedent in a HOWTO and I have removed it. It is now as
follows:

[global]
netbios name = dougs_computer
server string = Samba Server
workgroup = MSHOME
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
log file = /var/log/samba/%m.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
wins support = yes
hostname lookups = yes
hosts allow = 192.168.1. 127.
hosts deny = All
interfaces = lo eth0
bind interfaces only = yes
guest ok = yes
browse list = yes
load printers = yes
printcap name = cups
printing = cups

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = root

[print$]
comment = Printer Drivers
path = /etc/samba/drivers # this path holds the driver structure after \
cupsaddsmb command (this wrap isn't in the original)
browseable = yes
guest ok = no
read only = yes
write list = root

[MFC240C]
comment = Brother MFC 240C
printable = yes
path = /var/spool/samba
public = yes
guest ok = yes
printer admin = root


I had /etc/samba/drivers in smb.conf and /etc/samba/printer (from the
precedent) in reality, but fixing that made no difference (cupsaddsmb would
have created drivers/,but looped before getting that far) nor did setting
the permissions of drivers/ to 777.

I have user security and have added a Samba password for root
(the /root/tmp file contains root's username and password.)

Hostname lookup doesn't seem to be a real problem under Cups, according to
what I have found on the Web. It seems to be more of a problem for the
Windows client.

Should I alter the line "netbios name = dougs_computer" to agree with my
computer's hostname, which in abbreviated form is "dougshost"? Should I
perhaps set a separate hostname for 192.168.1.2?

Doug.
--
Here lies one who meant well, tried a little, failed much
- surely that may be his epitaph, of which he need not be ashamed.
-R.L. Stevenson.

Reply With Quote
  #9 (permalink)  
Old 07-22-2007
Doug Laidlaw
 
Posts: n/a
Default Re: Printing with Samba

Doug Laidlaw wrote:

> Robert Harris wrote:
>
>>> Doing it strictly according to the manpage, and using the Cups drivers,
>>> I get an error message from cupsaddsmb -v -a:
>>>
>>> Running command:
>>> smbclient ///var/run/cups/cups.sock/print$ -N -A /root/tmp/46a062b152080
>>> -c 'mkdir W32X86;put /root/tmp/46a062aaab486
>>> W32X86/MFC240C.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'
>>> Unknown parameter encountered: "hosts equiv"
>>> Ignoring unknown parameter "hosts equiv"

>>
>> That is an obsolete directive in your smb.conf file
>>
>>> Connection to Â*failed
>>>
>>> Unable to copy Windows 2000 printer driver files (1)!

>>
>> You have a permissions problem somewhere:
>>
>> 1. note that "security = share" doesn't work with cupsaddsmb
>> 2. make sure that you can write in the [print$] section of your smb.conf
>> file ("write list = root"), at least while you are doing cupsaddsmb.
>>
>> There is a chapter in the samba HOWTO book (at:
>>

>

<http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/CUPS-printing.html>
>> ) which discusses possible problems although it is not completely up to
>> date.
>>
>> It really does work.
>>
>> Robert
>>

>
> Thank you for the reference to Chapter 22. It contained a typical output
> of
> cupsaddsmb -v. Comparing it with what I got, the line
>
> Connection to failed
>
> should be:
>
> added interface...
>
> My smb.conf is a bit of a synthesis. The original as installed by the
> package was the heavily commented default one, so I replaced it with the
> one
> in man cupsaddsmb with a few extra parameters. The "hosts equiv"
> parameter
> came from a precedent in a HOWTO and I have removed it. It is now as
> follows:
>
> [global]
> netbios name = dougs_computer
> server string = Samba Server
> workgroup = MSHOME
> security = user
> encrypt passwords = yes
> smb passwd file = /etc/samba/smbpasswd
> log file = /var/log/samba/%m.log
> socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
> wins support = yes
> hostname lookups = yes
> hosts allow = 192.168.1. 127.
> hosts deny = All
> interfaces = lo eth0
> bind interfaces only = yes
> guest ok = yes
> browse list = yes
> load printers = yes
> printcap name = cups
> printing = cups
>
> [printers]
> comment = All Printers
> path = /var/spool/samba
> browseable = no
> public = yes
> guest ok = yes
> writable = no
> printable = yes
> printer admin = root
>
> [print$]
> comment = Printer Drivers
> path = /etc/samba/drivers # this path holds the driver structure after \
> cupsaddsmb command (this wrap isn't in the original)
> browseable = yes
> guest ok = no
> read only = yes
> write list = root
>
> [MFC240C]
> comment = Brother MFC 240C
> printable = yes
> path = /var/spool/samba
> public = yes
> guest ok = yes
> printer admin = root
>
>
> I had /etc/samba/drivers in smb.conf and /etc/samba/printer (from the
> precedent) in reality, but fixing that made no difference (cupsaddsmb
> would have created drivers/,but looped before getting that far) nor did
> setting the permissions of drivers/ to 777.
>
> I have user security and have added a Samba password for root
> (the /root/tmp file contains root's username and password.)
>
> Hostname lookup doesn't seem to be a real problem under Cups, according to
> what I have found on the Web. It seems to be more of a problem for the
> Windows client.
>
> Should I alter the line "netbios name = dougs_computer" to agree with my
> computer's hostname, which in abbreviated form is "dougshost"? Should I
> perhaps set a separate hostname for 192.168.1.2?
>
> Doug.


Well, I have partly answered my own question. Changing the Samba hostname
to dougshost achieved nothing.

My computer is connected by Ethernet to a router, and my wife's laptop is
connected by wireless to the same router. The router is 192.168.1.1, and
forces my Linux box to be 192.168.1.2 and the laptop to be 192.168.1.3
Setting my computer to have a static IP address of 192.168.1.2
(with /etc/hosts from the Linux from Scratch docs) got me two more lines
from cupsaddsmb before it failed again ("tree connect failed"). Progress.

It also blocked me from the Internet. That could be something to do with my
firewall, or that my router became the DNS server.These ideas always come
to mind several hours later.

Since I have reported this backwards, I will terminate this thread here.
start the config again from the beginning, make a diary of what I have
tried, and give a proper Smart Questions post later, if I am stuck for more
than 24 hours.

One good thing about books (see my random sig below) - they don't leave us
tearing our hair out.

Doug.
--
Books are good enough in their own way; but they are
a mighty bloodless substitute for life.
-R.L. Stevenson.

Reply With Quote
  #10 (permalink)  
Old 07-22-2007
Doug Laidlaw
 
Posts: n/a
Default Re: Printing with Samba

Doug Laidlaw wrote:

> It also blocked me from the Internet. Â*That could be something to do with
> my firewall, or that my router became the DNS server.These ideas always
> come to mind several hours later.
>

That was shoddy thinking on my part, trying to set the internal IP address
with the tool for an external static address. No wonder it didn't work! I
just can't stretch my mind to encompass the whole picture.

Doug.
--
Here lies one who meant well, tried a little, failed much
- surely that may be his epitaph, of which he need not be ashamed.
-R.L. Stevenson.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0