LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-28-2003, 06:50 AM   #1
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Rep: Reputation: 30
Getting CUPS to work with Samba


I recently started using Slackware 9, after using Mandrake for a couple of years. I want to set up CUPS on Slackware and run it with Samba so that my Windows 2000 machine can send print jobs to the printer that is connected to the Slackware machine.

I have Samba working properly (my Win2K machine can see the folder I am sharing). I have CUPS installed as well, but I can't seem to get any print jobs from the Win2K machine to successfully print. The Win2K machine sends the print job, and I can see the job in my print queue, but the printer never prints. I'm not sure if there is something that I need to add to my smb.conf file, or my cupsd.conf file. Below is my smb.conf file. Can someone recommend how to fix the problem?

Quote:
# Global parameters
[global]
workgroup = MSHOME
server string = Linux Samba Server %v
security = SHARE
encrypt passwords = Yes
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = cups
dns proxy = No
printer admin = @adm
printing = cups
username map = /etc/samba/smbusers
load printers = Yes

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr -P %p -o raw %s -r # using client side printer drivers.
browseable = No

[print$]
path = /var/spool/samba/printers
write list = @adm root
guest ok = Yes
read only = Yes
browseable = Yes

[CanonS900]
comment = It's a damn good printer.
path = /var/spool/samba
read only = No
create mask = 0700
guest ok = Yes
hosts allow = 192.168.0.4, 192.168.0.3, 192.168.0.2, 192.168.0.5
printable = Yes
print command = lpr -P %p -o raw %s -r # using client side printer drivers.
printer name = CanonS900
printing = cups
oplocks = No
 
Old 08-28-2003, 11:30 AM   #2
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Set printcap name to the location (full path) of your printcap file.
For example:
Code:
printcap name = /etc/printcap
 
Old 08-28-2003, 06:48 PM   #3
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mathieu
Set printcap name to the location (full path) of your printcap file.
For example:
Code:
printcap name = /etc/printcap
Still doesn't work. I can print locally from my Slackware box, but still not from my Win2K box.
 
Old 08-28-2003, 09:04 PM   #4
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Also, the print command requires the absolute path to the command.
Code:
print command = /usr/bin/lpr ...
 
Old 08-29-2003, 06:09 AM   #5
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mathieu
Also, the print command requires the absolute path to the command.
Code:
print command = /usr/bin/lpr ...
It still doesn't work. I'm beginning to wonder if the problem is with CUPS and not Samba. I remember when I used Mandrake, and ran 'iptraf', I would occasionally see the CUPS daemon broadcast over my LAN. But I don't see that when I run 'iptraf' with Slack. Although when I do a search, on my Win2K machine, for the Slack machine it shows the folder that I am sharing through Samba and my the printer connected to the Slack machine.

Last edited by jspaceman; 08-29-2003 at 06:15 AM.
 
Old 08-29-2003, 01:04 PM   #6
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
The printcap name and the print command are the only two things I noticed.

Quote:
The Win2K machine sends the print job, and I can see the job in my print queue, but the printer never prints.
In which queue ? (Win2k or Linux)
If the print job appears in the Linux queue, then the problem is with CUPS, not Samba.

If none of this works, the only other thing I can suggest is to remove the print command and let Samba use its default.
 
Old 08-30-2003, 05:44 AM   #7
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mathieu
The printcap name and the print command are the only two things I noticed.

In which queue ? (Win2k or Linux)
If the print job appears in the Linux queue, then the problem is with CUPS, not Samba.

If none of this works, the only other thing I can suggest is to remove the print command and let Samba use its default.
In the Linux queue, in /var/spool/cups, I can see what appear to be print jobs. They are labelled c00001, c00002, c00003, etc.

I've tried everything, tinkering with the smb.conf file and with the cupsd.conf file, but nothing seems to work.
 
Old 09-02-2003, 12:14 PM   #8
srenar
Member
 
Registered: Jul 2003
Posts: 31

Rep: Reputation: 15
samba is really not needed, just try this!!!!

Print from a Linux box to a shared Windows 2OOO printer using LPD
Install TCP/IP Print Services on the Windows 2OOO box:

Start -> Settings -> Control Panel -> Network and Dial-up Connections
-> Advanced Menu -> Optional Networking Components -> Tick Other Network
File and Print Services -> Click Next and fol1ow the prompts.

Enable TCP/IP Print Services on the Windows 2OOO box:

Start -> Settings _> Control Panel -> Adminīstrative Tools ->
Services -> Doub1e Click TCP/'IP Print Server -> Change Startup type
to Automatic -> Click OK

Ensure the Windows printer is shared out as you normally would and has the correct permissions to allow anyone to print to it.

Setup the printer in CUPS:
Administration -> Add Printer -> Give it a name -> LPD/LPR Host
or Printer -> lpd=//(server name or IP)/{printer share name}
(eg: lpd://1O.O.O.1O/HPLJ6P) -> Select your make and model.
Print a test page from CUPS to test it out.
 
Old 09-03-2003, 12:42 AM   #9
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Original Poster
Rep: Reputation: 30
Thanks, but I got Samba and CUPS to work afterall I downloaded the version of Samba and CUPS on Slackware's site and tinkered with my smb.conf file a little more, and now everything works.
 
Old 09-03-2003, 01:27 AM   #10
arakno
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware
Posts: 10

Rep: Reputation: 0
Quote:
Originally posted by jspaceman
Thanks, but I got Samba and CUPS to work afterall I downloaded the version of Samba and CUPS on Slackware's site and tinkered with my smb.conf file a little more, and now everything works.
Would you mind posting your configuration file (specially the printer configurations) now that it's working correctly? I'm having the same kind of problem here
 
Old 09-03-2003, 04:48 AM   #11
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by arakno
Would you mind posting your configuration file (specially the printer configurations) now that it's working correctly? I'm having the same kind of problem here
My smb.conf file:
Quote:
# Global parameters
[global]
workgroup = MSHOME
server string = %h Samba Server %v
security = SHARE
encrypt passwords = Yes
map to guest = Bad User
username map = /etc/samba/smbusers
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
printer admin = @adm
printing = cups
load printers = yes

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr -P %p -o raw %s -r
browseable = No

[print$]
path = /var/spool/samba
write list = @adm root
guest ok = Yes

[CanonS900]
comment = It's a damn good printer.
path = /var/spool/samba
read only = No
create mask = 0700
guest ok = Yes
hosts allow = 192.168.0.4, 192.168.0.3, 192.168.0.2, 192.168.0.5
printable = Yes
print command = lpr -P %p -o raw %s -r
printer name = CanonS900
My printcap file:
Quote:
CanonS900|CanonS900:rm=computerroom:rp=CanonS900:
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 01:33 AM
CUPS doesn't work Mathsniper Linux - Software 5 05-09-2005 06:57 AM
can't get samba+cups to work for remote printing blanny Linux - Networking 0 01-21-2004 12:02 AM
Samba and CUPS ghuber Linux - Networking 0 12-11-2003 10:42 AM
CUPS - Can't get it to work cstiger Slackware 6 06-20-2003 02:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration