Unix Technical Forum

cups & windows printing

This is a discussion on cups & windows printing within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I have Salck V10 setup to print through cups. All seems OK, no problems to set up my HP ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 03:11 PM
Les Orton
 
Posts: n/a
Default cups & windows printing

I have Salck V10 setup to print through cups.
All seems OK, no problems to set up my HP 960c.
Now I want to share the printer on the network.
I can see the Slack box OK, & can access files.
I have setup the printer in webmin, with samba, all seems OK except I can't
print.
I get access denied on the printer in windows.
Can anybody help? I have been trying to set the printer up since V9.
I have added my smb.conf file.
Thanks in advance
Lez

# Samba config file created using SWAT
# from 0.0.0.0 (0.0.0.0)
# Date: 2004/09/01 19:24:19

# Global parameters
[global]
workgroup = MYGROUP
netbios name = SLACK
server string = Samba Server
null passwords = Yes
log file = /var/log/samba.%m
max log size = 50
dns proxy = No
path = /var/spool/samba
read only = No
guest ok = Yes
printer name = hp960c

[homes]
comment = Home Directories
browseable = No

[printers]
comment = All Printers
valid users = les, lp, doreen, tv
printable = Yes
browseable = No

[doc]
path = /docs

[hp]
read only = Yes
printable = Yes
default devmode = Yes

[tmp]
path = /tmp

[all]
comment = Salck10
path = /
read only = Yes

[hprint]
path = /tmp
guest ok = No
printable = Yes
printer name = hprint

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 03:11 PM
Robert
 
Posts: n/a
Default Re: cups & windows printing

Les Orton wrote:

> I have Salck V10 setup to print through cups.
> All seems OK, no problems to set up my HP 960c.
> Now I want to share the printer on the network.
> I can see the Slack box OK, & can access files.
> I have setup the printer in webmin, with samba, all seems OK except I
> can't print.
> I get access denied on the printer in windows.


cupsd.conf
Cups is setup to only allow local printing. You need to allow externals
access. To allow access edit /etc/cups/cupsd.conf. At the bottom look
for;
<Location />
... original stuff here
# add this
Allow From All
# or just your network systems
# Allow From 192.168.2.*
</Location

Note: The browsing variables are on by default.

Then restart rc.cups


Samba:
load printers = yes
printcap name = /etc/printcap
printing = cups
[printers]
comment = printers
path = /var/spool/samba
browseable = yes
guest ok = yes
writable = yes
printable = yes
use client drivers = yes

Restart Samba

--
Robert - slackware

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 03:12 PM
Les Orton
 
Posts: n/a
Default Re: cups & windows printing

Robert wrote:

> Les Orton wrote:
>
>> I have Salck V10 setup to print through cups.
>> All seems OK, no problems to set up my HP 960c.
>> Now I want to share the printer on the network.
>> I can see the Slack box OK, & can access files.
>> I have setup the printer in webmin, with samba, all seems OK except I
>> can't print.
>> I get access denied on the printer in windows.

>
> cupsd.conf
> Cups is setup to only allow local printing. You need to allow externals
> access. To allow access edit /etc/cups/cupsd.conf. At the bottom look
> for;
> <Location />
> ... original stuff here
> # add this
> Allow From All
> # or just your network systems
> # Allow From 192.168.2.*
> </Location
>
> Note: The browsing variables are on by default.
>
> Then restart rc.cups
>
>
> Samba:
> load printers = yes
> printcap name = /etc/printcap
> printing = cups
> [printers]
> comment = printers
> path = /var/spool/samba
> browseable = yes
> guest ok = yes
> writable = yes
> printable = yes
> use client drivers = yes
>
> Restart Samba
>

Have done all above but still didn't work
I have attached some of my cups.conf file

## Use encryption if requested
#Encryption IfRequested
#</Location>

<Location />
#Encryption IfRequested
#Satisfy All
#Order deny,allow
#Deny From All
Allow From All
</Location>
<Location /admin>
#AuthType Basic
#AuthClass System
#Encryption IfRequested
#Satisfy All
#Order deny,allow
Allow From All
#Allow From 127.0.0.1
</Location>

# Network

Am I doing anything wrong?
Thanks Robert

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 03:12 PM
Robert
 
Posts: n/a
Default Re: cups & windows printing

>> cupsd.conf
>> Cups is setup to only allow local printing. You need to allow
>> externals access. To allow access edit /etc/cups/cupsd.conf. At the
>> bottom look for;
>> <Location />
>> ... original stuff here
>> # add this
>> Allow From All
>> # or just your network systems
>> # Allow From 192.168.2.*
>> </Location
>>
>> Note: The browsing variables are on by default.
>>
>> Then restart rc.cups
>>
>>
>> Samba:
>> load printers = yes
>> printcap name = /etc/printcap
>> printing = cups
>> [printers]
>> comment = printers
>> path = /var/spool/samba
>> browseable = yes
>> guest ok = yes
>> writable = yes
>> printable = yes
>> use client drivers = yes
>>
>> Restart Samba
>>

> Have done all above but still didn't work
> I have attached some of my cups.conf file
>
> ## Use encryption if requested
> #Encryption IfRequested
> #</Location>
>
> <Location />
> #Encryption IfRequested
> #Satisfy All
> #Order deny,allow
> #Deny From All
> Allow From All
> </Location>
> <Location /admin>
> #AuthType Basic
> #AuthClass System
> #Encryption IfRequested
> #Satisfy All
> #Order deny,allow
> Allow From All
> #Allow From 127.0.0.1
> </Location>
>
> # Network
>
> Am I doing anything wrong?
> Thanks Robert


A couple of dumb questions;
Do you have a firewall? If so, open it up.
You did a /etc/rc.d/rc.cups restart
You also changed your /etc/samba/smb.conf
and /etc/rc.d/rc.samba restart

If you are printing local, what I posted should do it. Should see
printer(s) during "add printer" in Windows and in Linux using KDE.

--
Robert - slackware

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 03:13 PM
Les Orton
 
Posts: n/a
Default Re: cups & windows printing

Robert wrote:

> A cpermissionsumb questions;
> Do you have a firewall? If so, open it up.
> You did a /etc/rc.d/rc.cups restart
> You also changed your /etc/samba/smb.conf
> and /etc/rc.d/rc.samba restart
>
> If you are printing local, what I posted should do it. Should see
> printer(s) during "add printer" in Windows and in Linux using KDE.


It is on an internal network, no firewalls,(as far as I know) I can access
the Slack box from windows with read/write access on home dir's
I changed the smb.conf file & restarted both (rebooted to make sure).

I wonder if it is a permissions problem with a temp directory or something?

Lez
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 03:13 PM
Robert
 
Posts: n/a
Default Re: cups & windows printing

Les Orton wrote:

> Robert wrote:
>
>> A cpermissionsumb questions;
>> Do you have a firewall? If so, open it up.
>> You did a /etc/rc.d/rc.cups restart
>> You also changed your /etc/samba/smb.conf
>> and /etc/rc.d/rc.samba restart
>>
>> If you are printing local, what I posted should do it. Should see
>> printer(s) during "add printer" in Windows and in Linux using KDE.

>
> It is on an internal network, no firewalls,(as far as I know) I can
> access the Slack box from windows with read/write access on home dir's
> I changed the smb.conf file & restarted both (rebooted to make sure).
>
> I wonder if it is a permissions problem with a temp directory or
> something?
>
> Lez


Tomorrow, I'll look at my box with the printer to see if I missed
something. But, so many have the same problem, I've got to where I just
copy the notes from an old message. Anyway, I'll double check. Look for
my response. Your samba is working, something in the printing.

You say you can print from the box where the printer is attached?

And your smb.conf has this for the printing stuff?

[global]
loadÂ*printersÂ*=Â*yes
printcapÂ*nameÂ*=Â*/etc/printcap
printingÂ*=Â*cups

[printers]
commentÂ*=Â*printers
pathÂ*=Â*/var/spool/samba
browseableÂ*=Â*yes
guestÂ*okÂ*=Â*yes
writableÂ*=Â*yes
printableÂ*=Â*yes
useÂ*clientÂ*driversÂ*=Â*yes


One thing just came to mind..... I had a problem like yours. In
desperation, I delete the spaces before each line and added spaces back
in. Noticed one line jumped to the left with only one delete key
press. Acted like an non-printable character was in-bedded and screwing
with the line. All worked after that. Yeah, I know... strange....

As root do a testparm at the prompt. Post all that here if you can and
I'll get back with you tomorrow.

--
Robert - slackware

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008, 03:14 PM
Robert
 
Posts: n/a
Default Re: cups & windows printing

Here's my smb.conf. Just checked it on a NT box and works perfect. Multi-
System cable and wireless LAN. Printer HP 940c. Check each line carefully
with what you have. Let me know what you come up with.

[global]
***workgroup*=*WORKGROUP
***server*string*=*Samba*%v*on*%L
***security*=*user
***encrypt*passwords*=*yes
***hosts*allow*=*192.168.1.*192.168.2.*
***load*printers*=*yes
***printcap*name*=*/etc/printcap
***printing*=*cups
***log*file*=*/var/log/samba.%m
***log*level*=*2
***max*log*size*=*50
***socket*options*=*TCP_NODELAY
***#*Shouldn't*need*this*to*print*and*was*added*af ter*printer*worked.*
***#*Put*it*in*if*your*box*is*going*to*be*the*mast er*browser.
***local*master*=*yes
***domain*master*=*yes
***preferred*master*=*yes
***wins*support*=*yes
***dns*proxy*=*no*

[homes]
***comment*=*Home*Directories
***browseable*=*no
***read*only*=*no
***writable*=*yes*******
***guest*ok*=*no
***create*mode*=*0750

[tmp]
***comment*=*Temporary*file*space
***path*=*/tmp
***read*only*=*no
***public*=*yes
***guest*ok*=*yes

[var]
***comment*=*var*directory
***path*=*/var
***browseable*=*yes
***read*only*=*no
***guest*ok*=*no*
***valid*users*=*@wheel
***create*mode*=*0660
***directory*mode*=*0770

[printers]
***comment*=*All*Printers
***path*=*/var/spool/samba
***browseable*=*yes
***guest*ok*=*yes
***writable*=*yes
***printable*=*yes
***use*client*driver*=*yes

--Robert - Slackware

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-19-2008, 03:15 PM
Les Orton
 
Posts: n/a
Default Re: cups & windows printing

Robert wrote:

> Here's my smb.conf. Just checked it on a NT box and works perfect. Multi-
> System cable and wireless LAN. Printer HP 940c. Check each line carefully
> with what you have. Let me know what you come up with.


Thanks for the info
Used your smb.conf file, putting in the various adjustments (192.168.0. etc)
Still no printing.
I have attached the result of testparm
Hope you can understand it.

Thanks
Lez

Load smb config files from /etc/samba/smb.conf
Unknown parameter encountered: "***workgroup*"
Ignoring unknown parameter "***workgroup*"
Unknown parameter encountered: "***server*string*"
Ignoring unknown parameter "***server*string*"
Unknown parameter encountered: "***security*"
Ignoring unknown parameter "***security*"
Unknown parameter encountered: "***encrypt*passwords*"
Ignoring unknown parameter "***encrypt*passwords*"
Unknown parameter encountered: "***hosts*allow*"
Ignoring unknown parameter "***hosts*allow*"
Unknown parameter encountered: "***load*printers*"
Ignoring unknown parameter "***load*printers*"
Unknown parameter encountered: "***printcap*name*"
Ignoring unknown parameter "***printcap*name*"
Unknown parameter encountered: "***printing*"
Ignoring unknown parameter "***printing*"
Unknown parameter encountered: "***log*file*"
Ignoring unknown parameter "***log*file*"
Unknown parameter encountered: "***log*level*"
Ignoring unknown parameter "***log*level*"
Unknown parameter encountered: "***max*log*size*"
Ignoring unknown parameter "***max*log*size*"
Unknown parameter encountered: "***socket*options*"
Ignoring unknown parameter "***socket*options*"
params.c:Parameter() - Ignoring badly formed line in configuration
file: ***#*Shouldn't*need*this*to*print*and*was*added*af ter*printer*worked.*
params.c:Parameter() - Ignoring badly formed line in configuration
file: ***#*Put*it*in*if*your*box*is*going*to*be*the*mast er*browser.
Unknown parameter encountered: "***local*master*"
Ignoring unknown parameter "***local*master*"
Unknown parameter encountered: "***domain*master*"
Ignoring unknown parameter "***domain*master*"
Unknown parameter encountered: "***preferred*master*"
Ignoring unknown parameter "***preferred*master*"
Unknown parameter encountered: "***wins*support*"
Ignoring unknown parameter "***wins*support*"
Unknown parameter encountered: "***dns*proxy*"
Ignoring unknown parameter "***dns*proxy*"
Processing section "[homes]"
Unknown parameter encountered: "***comment*"
Ignoring unknown parameter "***comment*"
Unknown parameter encountered: "***browseable*"
Ignoring unknown parameter "***browseable*"
Unknown parameter encountered: "***read*only*"
Ignoring unknown parameter "***read*only*"
Unknown parameter encountered: "***writable*"
Ignoring unknown parameter "***writable*"
Unknown parameter encountered: "***guest*ok*"
Ignoring unknown parameter "***guest*ok*"
Unknown parameter encountered: "***create*mode*"
Ignoring unknown parameter "***create*mode*"
Processing section "[tmp]"
Unknown parameter encountered: "***comment*"
Ignoring unknown parameter "***comment*"
Unknown parameter encountered: "***path*"
Ignoring unknown parameter "***path*"
Unknown parameter encountered: "***read*only*"
Ignoring unknown parameter "***read*only*"
Unknown parameter encountered: "***public*"
Ignoring unknown parameter "***public*"
Unknown parameter encountered: "***guest*ok*"
Ignoring unknown parameter "***guest*ok*"
No path in service tmp - using /tmp
Processing section "[var]"
Unknown parameter encountered: "***comment*"
Ignoring unknown parameter "***comment*"
Unknown parameter encountered: "***path*"
Ignoring unknown parameter "***path*"
Unknown parameter encountered: "***browseable*"
Ignoring unknown parameter "***browseable*"
Unknown parameter encountered: "***read*only*"
Ignoring unknown parameter "***read*only*"
Unknown parameter encountered: "***guest*ok*"
Ignoring unknown parameter "***guest*ok*"
Unknown parameter encountered: "***valid*users*"
Ignoring unknown parameter "***valid*users*"
Unknown parameter encountered: "***create*mode*"
Ignoring unknown parameter "***create*mode*"
Unknown parameter encountered: "***directory*mode*"
Ignoring unknown parameter "***directory*mode*"
No path in service var - using /tmp
Processing section "[printers]"
Unknown parameter encountered: "***comment*"
Ignoring unknown parameter "***comment*"
Unknown parameter encountered: "***path*"
Ignoring unknown parameter "***path*"
Unknown parameter encountered: "***browseable*"
Ignoring unknown parameter "***browseable*"
Unknown parameter encountered: "***guest*ok*"
Ignoring unknown parameter "***guest*ok*"
Unknown parameter encountered: "***writable*"
Ignoring unknown parameter "***writable*"
Unknown parameter encountered: "***printable*"
Ignoring unknown parameter "***printable*"
Unknown parameter encountered: "***use*client*driver*"
Ignoring unknown parameter "***use*client*driver*"
WARNING: [printers] service MUST be printable!
No path in service printers - using /tmp
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]
netbios name = SLACK
null passwords = Yes

[homes]

[tmp]
path = /tmp

[var]
path = /tmp

[printers]
path = /tmp
printable = Yes
browseable = No

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-19-2008, 03:15 PM
/dev/rob0
 
Posts: n/a
Default Re: cups & windows printing

On Sun, 05 Sep 2004 14:58:26 +0100, Les Orton wrote:
[testparm]
> Load smb config files from /etc/samba/smb.conf
> Unknown parameter encountered: "***workgroup*"
> Ignoring unknown parameter "***workgroup*"
> Unknown parameter encountered: "***server*string*"


These are common settings. If testparm thinks they're unknown you must
have a syntax error. My guess is that you're missing the "[global]"
section header at the top.

> params.c:Parameter() - Ignoring badly formed line in configuration
> file: ***#*Shouldn't*need*this*to*print*and*was*added*af ter*printer*worked.


Another possibility: you've used a Windows editor on the file.
cd /etc/samba && mv smb.conf DOS && fromdos < DOS > smb.conf

> Processing section "[var]"
> [snip]
> Unknown parameter encountered: "***create*mode*"
> Ignoring unknown parameter "***create*mode*"
> Unknown parameter encountered: "***directory*mode*"
> Ignoring unknown parameter "***directory*mode*"


You wanted to share your /var using Samba? Windows users (and normal
Unix users) do not need to be writing files outside $HOME and /tmp. (I
often set up common areas other than /tmp for sharing.)

> Press enter to see a dump of your service definitions


Not much, eh? Clearly a badly mangled smb.conf. Take it out and put it
out of its misery. Then start over with a Unix editor.
--
/dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
or put "not-spam" or "/dev/rob0" in Subject header to reply

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-19-2008, 03:15 PM
Robert
 
Posts: n/a
Default Re: cups & windows printing

<snip, snip, snip, and snip-snip>

Send that to the Samba team. I think you broke the record for the most
errors.

Agree with /dev/rob0.

What are you using for an editor? And why are you having so much
trouble?

--
Robert - slackware

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:43 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com