Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samba and Cups Problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
grudge
Tux's lil' helper
Tux's lil' helper


Joined: 26 Oct 2002
Posts: 77
Location: South Africa

PostPosted: Wed Mar 10, 2004 9:43 am    Post subject: Samba and Cups Problem Reply with quote

EDIT : It seems like my cupsd.conf was incorrect. I fixed it up and now it's printing without any problems. The only problem I still have now is that it shows the Printer in windows but when I open the Jobs lists it shows 'Unable to connect, access denied', but atleast it prints. Thanks to all the help'
/EDIT

I've searched for a solution but I can't find anything so now I'm posting here :

I've got a HP Laserjet 4000 running on cups on our Gentoo server, and from the web admin I can print a test page without any problems. I am now trying to share it via samba on the the domain and it can be installed, but anything I print to it just doesn't happen, I'm getting the idea that the job never reaches cups so I think there is something wrong with my samba setup ?

This is what I get in the log whenever I try to print via the windows share :

Code:

Mar 10 11:39:12 [smbd] Unable to get jobs for ipp://localhost/printers/HPLaserJet - client-error-not-authorized_
Mar 10 11:39:15 [smbd] [2004/03/10 11:39:15, 0] printing/print_cups.c:cups_job_submit(764)_
Mar 10 11:39:15 [smbd] Unable to print file to `HPLaserJet' - client-error-not-authorized_


and here is my smb.conf :

Code:

[global]

  workgroup = scevdbp
  netbios name = lserver

  server string = SCE Vanderbijlpark Samba PDC Server %v


    os level = 64
    preferred master = yes
    local master = yes
    domain master=yes
   
   printcap name = cups
   load printers = yes

printing = cups

printer admin = @users tvdbon

   log file = /var/log/samba/log.%m

   max log size = 50


   security = user


  encrypt passwords = yes
  smb passwd file = /etc/samba/private/smbpasswd

  unix password sync = no
  passwd program = /usr/bin/passwd %u
  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n*passwd:*all*authentication*tokens*updated*successfully*



   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

   logon script = netlogon.bat

    logon path = \\%L\profiles\%U

    logon home = \\%L\%U\.profile
    logon drive = H:


   dns proxy = no


#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

 [netlogon]
   comment = Network Logon Service
   path = /var/lib/samba/netlogon
   read only = yes
   write list = sschocke

[profiles]
    path = /var/lib/samba/profiles
    writeable = yes
    browseable = no
    create mask = 0600
    directory mask = 0700

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = yes
   public = yes
# to allow user 'guest account' to print.
   guest ok = yes
   writable = no
   printable = yes
   create mode = 0700

   print command = lpr -P %p -o raw %s -r   # using client side printer drivers.

[print$]
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   write list = @adm root

[webroot]
   comment = Webserver Root
   path = /var/www/localhost/htdocs
   valid users = sschocke lvanwyk tvdbon
   public = no
   writable = yes
   printable = no

[HPLaserJet]
    comment = HP Laserjet 4000 on Linux Server
    printable = yes
    path = /var/spool/samba
    public = yes
    guest ok = yes
    printer admin = root
   


Anybody know whats going on ?


Last edited by grudge on Thu Mar 11, 2004 7:48 am; edited 1 time in total
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Wed Mar 10, 2004 3:58 pm    Post subject: Reply with quote

Samba will use CUPS-specific calls to print files, if you compile it with CUPS support (which you probably did) and if you specify "printing = CUPS" in smb.conf (as you did). The result should be direct printing from Samba to the CUPS queue, without using lpr or the like. Unfortunately, in your case this seems to be going badly. Perhaps your CUPS configuration is requiring authentication; check /etc/cups/cups.conf for authentication options, such as "AuthType". Maybe something will jump out at you and you'll be able to fix it.

Failing that, I'd suggest you first try printing from the command line using lpr. If that works, a viable workaround is to set "printing = lprng" in smb.conf. (You might need to adjust the "printcap name" parameter, too, but I'm not positive of that.) This should tell Samba that you're using LPRng, which you're not, but CUPS will accept the same lpr command that LPRng uses, so you should at least be able to print. (If you need more advanced features, such as if clients should be able to delete print jobs, you may need to tweak some of the other printing parameters in smb.conf, though.) This isn't quite as efficient as using the CUPS-native methods, but this drawack is minor on any but a busy dedicated print server.
Back to top
View user's profile Send private message
yoda34
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2003
Posts: 93

PostPosted: Wed Mar 10, 2004 5:54 pm    Post subject: Reply with quote

This may be totally unrelated but I was the same problem with my printer(different vendor). I was using the gimp-print- drivers. It turned out that after I downgraded my version of gimp-print my setup worked perfectly. Maybe you are having a problem with your drivers?
Back to top
View user's profile Send private message
grudge
Tux's lil' helper
Tux's lil' helper


Joined: 26 Oct 2002
Posts: 77
Location: South Africa

PostPosted: Thu Mar 11, 2004 6:18 am    Post subject: Reply with quote

Quote:
Failing that, I'd suggest you first try printing from the command line using lpr. If that works, a viable workaround is to set "printing = lprng" in smb.conf


This works fine without any problems, but this is only on the machine on which cups is running.

Anyways, here is my /etc/cups/cupsd.conf :

Code:


########
######## Server Identity
########

ServerName lserver.sce.co.za
ServerAdmin root@sce.co.za


########
######## Server Options
########

DocumentRoot /usr/share/cups/docs
LogLevel debug
Printcap /etc/printcap

User lp
Group lp

Listen 127.0.0.1:631

HostNameLookups On

MaxClients 100

Browsing On

BrowseProtocols cups

BrowseAddress @IF(eth0)

BrowseAllow 192.168.20.*

########
######## Security Options
########
SystemGroup lp


<Location />
AuthType Basic
AuthClass User

Order Deny,Allow
Deny From All
Allow From 192.168.20.*
</Location>

<Location /jobs>
AuthType Basic
AuthClass User

Order Deny,Allow
Deny From All
Allow From 192.168.20.*
</Location>

<Location /printers>
AuthType Basic
AuthClass User

Order Deny,Allow
Deny From All
Allow From 192.168.20.*
</Location>


<Location /admin>

AuthType Basic
AuthClass System

## Restrict access to local domain
Order Deny,Allow
Deny From All
Allow From 127.0.0.1

#Encryption Required
</Location>



Anybody see anything funny in here ? or Something else I can try, I'd really like to use cups
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Thu Mar 11, 2004 3:04 pm    Post subject: Reply with quote

grudge wrote:
Quote:
Failing that, I'd suggest you first try printing from the command line using lpr. If that works, a viable workaround is to set "printing = lprng" in smb.conf


This works fine without any problems, but this is only on the machine on which cups is running.


I'm not sure what you mean by this. Your first post only described a single Linux box running CUPS and Samba. Are you saying you've got additional Linux boxes and printing from them doesn't work? If so, are you using CUPS, LPD, Samba, or some other method to submit print jobs? What sort of errors are you seeing?

Quote:
Anyways, here is my /etc/cups/cupsd.conf :

Code:

<Location />
AuthType Basic
AuthClass User
...
<Location /jobs>
AuthType Basic
AuthClass User
...
<Location /printers>
AuthType Basic
AuthClass User
...
<Location /admin>
AuthType Basic
AuthClass System


Anybody see anything funny in here ? or Something else I can try, I'd really like to use cups


The AuthType and AuthClass directives, as set, tell CUPS to require password authentication. That's most likely the source of your original problem, and may be what's causing whatever problem you're having now. Ordinarily, if you don't want to use passwords for remote access, you'd set
"AuthType None" (in which case, if I understand correctly, AuthClass becomes irrelevant). Note that you'd do this on the /printers location, and perhaps on the /jobs and / locations, but not on the /admin location -- you presumably still want to require a password to administer the printing system.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum