Networking Forums

Networking Forums > Computer Networking > Linux Networking > Printing from Samba

Reply
Thread Tools Display Modes

Printing from Samba

 
 
Doug Laidlaw
Guest
Posts: n/a

 
      12-11-2007, 01:51 AM
After my previous fight with the computers, I wrote:

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.

So, here it is again:

My problem: I have a Brother printer which isn't on the CUPS list of
printers. A driver in RPM format is available from Brother's Web site,
which works with Cups, but it is very slow compared to Windows printing.
KDE calls it defective, and I use KDE.

I am running Samba 1.3

The printer is connected via USB to my Mandriva system. I want my wife's
laptop running XP to be able to print to it via Samba, since she has
nowhere to put a printer in her study, otherwise I might do the reverse.

Running cupsaddsmb, I initially got an error: "No Windows printer drivers
are installed!"

I then deleted Mandriva's "omnibus" smb.conf, and installed one with only
what I need. At present, it is as follows:

[global]
netbios name = The_Server
server string = Samba Server
workgroup = My_Windows_Work_group
security = user
encrypt passwords = yes
smb passwd file = /var/lib/samba/private/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 equiv = /etc/hosts
hosts allow = 192.168.1. 127.
hosts deny = All
interfaces = lo eth0
bind interfaces only = yes
guest ok = yes
browse list = yes
printcap name = cups
printing = cups
load printers = yes

[home_directories]
comment = User's home directory
path = /home/%U
read only = no
valid users = %U root

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

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

[print$]
comment = Printer Drivers
path = /etc/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = root

With it, I can browse my Home directories.

To create the Windows files in C:\...\w32X86\3\, I followed the procedure in
the Gentoo Samba HOWTO, and installed a Postscript printer. I then copied
the files across to /usr/share/cups/drivers. The RPM for CUPS6 has a bug,
in that it accepts only Cups 1.1 and 1.2, although it says ">". This is
repeated in the one provided by Mandriva, but the tarball ran perfectly. I
also put the .ppd file in the same directory. My \3\ directory on XP has a
heap of other files, not mentioned in the HOWTO. I copied them across as
well.

The output from cupsaddsmb is now:

"Running command:
smbclient ///var/run/cups/cups.sock/print$ -N -A /root/tmp/475df93dc0818 -c 'mkdir
W32X86;put /root/tmp/475df933a18e4
W32X86/BROTHERM240C.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'
Connection to failed

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


repeating indefinitely. The command is all on one line.

I was told that this is a permissions problem, but my [print$] share looks
O.K. All driver files are 664, owned by root.

For Ubuntu, which doesn't have a root user, there was a suggestion to put an
ordinary user in the cupsaddsmb command line, but I should not need that.

I seem to recall that in the end I was told to ditch the whole idea and do
it differently - perhaps let the client use its own drivers? I can't find
that thread now.

I have added the Samba server to my /etc/hosts, but haven't given my computer
a fixed IP address. It is always 192.168.1.2.

Any suggestions appreciated.

Doug.
 
Reply With Quote
 
 
 
 
D.Campagna
Guest
Posts: n/a

 
      12-14-2007, 01:14 PM
Doug Laidlaw ha scritto:
> After my previous fight with the computers, I wrote:
>
> 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.
>
> So, here it is again:
>
> My problem: I have a Brother printer which isn't on the CUPS list of
> printers. A driver in RPM format is available from Brother's Web site,
> which works with Cups, but it is very slow compared to Windows printing.
> KDE calls it defective, and I use KDE.
>
> I am running Samba 1.3
>
> The printer is connected via USB to my Mandriva system. I want my wife's
> laptop running XP to be able to print to it via Samba, since she has
> nowhere to put a printer in her study, otherwise I might do the reverse.
>
> Running cupsaddsmb, I initially got an error: "No Windows printer drivers
> are installed!"
>
> I then deleted Mandriva's "omnibus" smb.conf, and installed one with only
> what I need. At present, it is as follows:
>
> [global]
> netbios name = The_Server
> server string = Samba Server
> workgroup = My_Windows_Work_group
> security = user
> encrypt passwords = yes
> smb passwd file = /var/lib/samba/private/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 equiv = /etc/hosts
> hosts allow = 192.168.1. 127.
> hosts deny = All
> interfaces = lo eth0
> bind interfaces only = yes
> guest ok = yes
> browse list = yes
> printcap name = cups
> printing = cups
> load printers = yes
>
> [home_directories]
> comment = User's home directory
> path = /home/%U
> read only = no
> valid users = %U root
>
> [printers]
> comment = All Printers
> browseable = no
> printable = yes
> writable = no
> public = yes
> guest ok = yes
> path = /var/spool/samba
> printer admin = root
>
> # [M240C]
> #comment = Brother Multifunction 240C
> #printable = yes
> #path = /var/spool/samba
> #public = yes
> #guest ok = yes
> #printer admin = root
>
> [print$]
> comment = Printer Drivers
> path = /etc/samba/drivers
> browseable = yes
> guest ok = no
> read only = yes
> write list = root
>
> With it, I can browse my Home directories.
>
> To create the Windows files in C:\...\w32X86\3\, I followed the procedure in
> the Gentoo Samba HOWTO, and installed a Postscript printer. I then copied
> the files across to /usr/share/cups/drivers. The RPM for CUPS6 has a bug,
> in that it accepts only Cups 1.1 and 1.2, although it says ">". This is
> repeated in the one provided by Mandriva, but the tarball ran perfectly. I
> also put the .ppd file in the same directory. My \3\ directory on XP has a
> heap of other files, not mentioned in the HOWTO. I copied them across as
> well.
>
> The output from cupsaddsmb is now:
>
> "Running command:
> smbclient ///var/run/cups/cups.sock/print$ -N -A /root/tmp/475df93dc0818 -c 'mkdir
> W32X86;put /root/tmp/475df933a18e4
> W32X86/BROTHERM240C.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'
> Connection to failed
>
> Unable to copy Windows 2000 printer driver files (1)!"
>
>
> repeating indefinitely. The command is all on one line.
>
> I was told that this is a permissions problem, but my [print$] share looks
> O.K. All driver files are 664, owned by root.
>
> For Ubuntu, which doesn't have a root user, there was a suggestion to put an
> ordinary user in the cupsaddsmb command line, but I should not need that.
>
> I seem to recall that in the end I was told to ditch the whole idea and do
> it differently - perhaps let the client use its own drivers? I can't find
> that thread now.
>
> I have added the Samba server to my /etc/hosts, but haven't given my computer
> a fixed IP address. It is always 192.168.1.2.
>
> Any suggestions appreciated.
>
> Doug.

Just because I can't see any response to you from more experienced users...
I have put up a server with cups for a network of winXP machines. The
printer is installed in cups as a raw printer, and the win clients
should have the correct driver installed. That's all, it works fine.
HTH
Dan
 
Reply With Quote
 
leetncamp@gmail.com
Guest
Posts: n/a

 
      01-09-2008, 01:19 AM
On Dec 10 2007, 6:51*pm, Doug Laidlaw <d...@dougshost.invalid> wrote:
> After my previous fight with the computers, I wrote:
>
> 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.
>
> So, here it is again:
>
> My problem: I have a Brother printer which isn't on the CUPS list of
> printers. *A driver in RPM format is available from Brother's Web site,
> which works with Cups, but it is very slow compared to Windows printing.
> KDE calls it defective, and I use KDE.
>
> I am running Samba 1.3
>
> The printer is connected via USB to my Mandriva system. *I want my wife's
> laptop running XP to be able to print to it via Samba, since she has
> nowhere to put a printer in her study, otherwise I might do the reverse.
>
> Running cupsaddsmb, I initially got an error: "No Windows printer drivers
> are installed!"
>
> I then deleted Mandriva's "omnibus" smb.conf, and installed one with only
> what I need. *At present, it is as follows:
>
> *[global]
> netbios name = The_Server
> server string = Samba Server
> workgroup = My_Windows_Work_group
> security = user
> encrypt passwords = yes
> smb passwd file = /var/lib/samba/private/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 equiv = /etc/hosts
> hosts allow = 192.168.1. 127.
> hosts deny = All
> interfaces = lo eth0
> bind interfaces only = yes
> guest ok = yes
> browse list = yes
> printcap name = cups
> printing = cups
> load printers = yes
>
> *[home_directories]
> comment = User's home directory
> path = /home/%U
> read only = no
> valid users = %U root
>
> *[printers]
> comment = All Printers
> browseable = no
> printable = yes
> writable = no
> public = yes
> guest ok = yes
> path = /var/spool/samba
> printer admin = root
>
> # [M240C]
> #comment = Brother Multifunction 240C
> #printable = yes
> #path = /var/spool/samba
> #public = yes
> #guest ok = yes
> #printer admin = root
>
> *[print$]
> comment = Printer Drivers
> path = /etc/samba/drivers
> browseable = yes
> guest ok = no
> read only = yes
> write list = root
>
> With it, I can browse my Home directories. *
>
> To create the Windows files in C:\...\w32X86\3\, I followed the procedure in
> the Gentoo Samba HOWTO, and installed a Postscript printer. *I then copied
> the files across to /usr/share/cups/drivers. *The RPM for CUPS6 has a bug,
> in that it accepts only Cups 1.1 and 1.2, although it says ">". *This is
> repeated in the one provided by Mandriva, but the tarball ran perfectly. *I
> also put the .ppd file in the same directory. *My \3\ directory on XP has a
> heap of other files, not mentioned in the HOWTO. *I copied them across as
> well.
>
> The output from cupsaddsmb is now:
>
> "Running command:
> smbclient ///var/run/cups/cups.sock/print$ -N -A /root/tmp/475df93dc0818 -c 'mkdir
> W32X86;put /root/tmp/475df933a18e4
> W32X86/BROTHERM240C.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'
> Connection to *failed
>
> Unable to copy Windows 2000 printer driver files (1)!"
>
> repeating indefinitely. *The command is all on one line.
>
> I was told that this is a permissions problem, but my [print$] share looks
> O.K. *All driver files are 664, owned by root.

There is a definition of who is the printer admin in your /etc/samba/
smb.conf file.The directive might look something like this

printer admin = smbprint

where smbprint is a valid user on your system. When the cupsaddsmb
command attempts to copy the file, it first pretends to be a windows
smb client. It connects as the user you specify on the cupsaddsmb
command line, which must be a valid user in the samba passwd file,
presumably smbprint.

Root probably isn't allowed to connect to your samba server.

Define a user in both samb and on your system with the same name,
designate that user as the printer admin in the smb.conf file and then
pass that name in on the cupsaddsmb command line.

you should also be able to connect from a windows box to samba-server/
print$ as the print admin and write files.



>



> For Ubuntu, which doesn't have a root user, there was a suggestion to put an
> ordinary user in the cupsaddsmb command line, but I should not need that.
>
> I seem to recall that in the end I was told to ditch the whole idea and do
> it differently - perhaps let the client use its own drivers? *I can't find
> that thread now.
>
> I have added the Samba server to my /etc/hosts, but haven't given my computer
> a fixed IP address. *It is always 192.168.1.2.
>
> Any suggestions appreciated.
>
> Doug.


 
Reply With Quote
 
 
 
Reply

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing via Samba Doug Laidlaw Linux Networking 4 06-04-2008 11:27 PM
Printing with Samba Doug Laidlaw Linux Networking 9 07-22-2007 04:52 PM
Printing over samba Mark Tilford Linux Networking 4 01-24-2007 05:21 PM
Printing with CUPS through SAMBA Hikaru79 Linux Networking 0 11-04-2004 02:20 AM
Samba Printing Problem TLann Linux Networking 4 12-09-2003 01:05 AM



1 2 3 4 5 6 7 8 9 10 11