Cups + Samba won't print.

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Cups + Samba won't print.

Postby alexcortes » Sun Oct 09, 2011 17:32

Hello for all!

I recently migrate from ArchLinux to Sabayon, and I'm having some problems to print using samba.

Any advise?

Using USB, OK.

samba-3.6.0 (same with 3.5.8/3.5.11)
cups-1.4.8 (same with 1.5.0) - compiled with samba flag.

#lpinfo -v
network https
network ipp
network http
network socket
direct scsi
network lpd
file cups-pdf:/
network beh
network smb


smb.conf
Code: Select all
[global]
...
load printers       = yes
printcap name    = cups
printing             = cups
...
[printers]
comment              = All printers
path             = /var/spool/samba
browseable       = no
guest only         = yes
guest ok             = yes
printable             = yes
writable             = no


cupsd.conf
Code: Select all
#
# "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Administrator user group...
SystemGroup sys root lpadmin


# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS
BrowseAddress 192.168.*:631

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow localhost
  Allow from 192.168.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    Order deny,allow
  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Default
    Order deny,allow
  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $".
#


$smbclient -L 192.168.1.101
Code: Select all
Domain=[RUY-PC] OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7 Professional 6.1]

   Sharename       Type      Comment
   ---------       ----      -------
   ADMIN$          Disk      Administração remota
   C$              Disk      Recurso compartilhado padrão
   EPSON T25 Series Printer   EPSON T25 Series
   HP Deskjet 2050 J510 series Printer   HP Deskjet 2050 J510 series
   IPC$            IPC       IPC remoto
   print$          Disk      Drivers de impressora
   Users           Disk     
session request to 192.168.1.101 failed (Called name not present)
session request to 192 failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)
NetBIOS over TCP disabled -- no workgroup available



I setup the printer (HP%Deskjet%2050%J510%series) using cups web interface.
Gutenprint and foomatics packages installed.

Samba logs not show error.
HPLIP and system-config-printer doesn't find the printer.
"This print share is not accessible"

Testing with another printer, EPSON T25 Series Printer, I have same errors.

Thank you. :D
User avatar
alexcortes
Baby Hen
 
Posts: 9
Joined: Thu Oct 06, 2011 19:34
Location: Rio de Janeiro/Brazil

Re: Cups + Samba won't print.

Postby Fitzcarraldo » Sun Oct 09, 2011 21:34

If printing via USB is OK but not via a network, then I'd suspect the UFW firewall that is enabled by default with SL. Have you tried disabling your firewall to see if you can print? If it works with the firewall disabled, you can enable the firewall and configure UFW to enable printing via CUPS and Samba: How to config ufw/ufw-frontends for Samba browsing/printing
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Cups + Samba won't print.

Postby raman » Mon Oct 10, 2011 17:18

Fitz rulez.
raman
Advanced Hen
 
Posts: 235
Joined: Mon Sep 06, 2010 17:18
Location: Poland

Re: Cups + Samba won't print.

Postby alexcortes » Thu Oct 13, 2011 7:07

Hello,

I disabled iptables (I removed ufw during installation - CoreCDX) and same issue.
I (re*)found another problem, with samba. When samba starts during boot, nobody can 'see me' on network (at my side OK), but if I restart samba after login, the shares are perfect for every one.
Tomorrow I'll try using a wired connection, I'm thinking about some issue with my wireless card (RT2860).

*I had this problem with Arch Linux too, since samba 3.5.4.

Thank You! :D
User avatar
alexcortes
Baby Hen
 
Posts: 9
Joined: Thu Oct 06, 2011 19:34
Location: Rio de Janeiro/Brazil

Re: Cups + Samba won't print.

Postby alexcortes » Thu Oct 13, 2011 7:44

Tested using a wired connection: all is same. :(

Thanks!
User avatar
alexcortes
Baby Hen
 
Posts: 9
Joined: Thu Oct 06, 2011 19:34
Location: Rio de Janeiro/Brazil

Re: Cups + Samba won't print.

Postby Fitzcarraldo » Thu Oct 13, 2011 23:46

In case it's of any help to you, here's my smb.conf (with the comments stripped out):

Code: Select all
[global]
netbios name = meshedgedx
message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
printcap name = cups
printing = cups
printer admin = @adm
log file = /var/log/samba3/log.%m
max log size = 50
map to guest = bad user
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/private/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
name resolve order = wins lmhosts bcast
wins support = yes
dns proxy = no

[homes]
comment = Home Directories
read only = no

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = yes

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

[print$]
path = /var/lib/samba/printers
write list = @adm root
guest ok = yes

[PUBLIC]
path = /home/fitzcarraldo/Public/
guest ok = yes
read only = no

I'm printing successfully to several networked printers (both directly networked and attached to a Windows Vista machine), as well as to local USB printers too from my main laptop.

Again, in case it helps you, below is a list of the versions of Samba and CUPS I'm using on my main laptop:

Code: Select all
$ eix -I samba
[I] net-fs/samba
     Available versions:  3.5.11!t [M](~)3.6.0!t [M](~)4.0.0_alpha11!m {acl addns ads +aio avahi caps +client cluster cups debug doc dso examples fam gnutls ldap ldb +netapi pam +python quota +readline +server +smbclient smbsharemodes smbtav2 sqlite swat syslog threads +tools winbind}                                                                                                                                                                                                         
     Installed versions:  3.5.11!t(20:48:56 10/09/11)(acl aio avahi client cups fam ldap netapi pam readline server smbclient winbind -addns -ads -caps -cluster -debug -doc -examples -ldb -quota -smbsharemodes -smbtav2 -swat -syslog)
     Homepage:            http://www.samba.org/
     Description:         Samba Server component

$ eix -I cups
[I] dev-python/pycups
     Available versions:  1.9.49 1.9.57 (~)1.9.58 (~)1.9.59 {doc examples}
     Installed versions:  1.9.59(18:06:51 05/10/11)(-doc -examples)
     Homepage:            http://cyberelk.net/tim/data/pycups/
     Description:         Python bindings for the CUPS API

[I] net-print/cups
     Available versions:  1.3.11-r4!t 1.4.6-r2!t 1.4.8-r1!t (~)1.4.8-r21!t (~)1.4.8-r22!t (~)1.4.8-r22!t[1] [M](~)1.5.0-r1!t [M](~)1.5.0-r2!t {X acl avahi dbus debug elibc_FreeBSD gnutls java (+)jpeg kerberos ldap linguas_da linguas_de linguas_en linguas_es linguas_et linguas_eu linguas_fi linguas_fr linguas_he linguas_id linguas_it linguas_ja linguas_ko linguas_nl linguas_no linguas_pl linguas_pt linguas_pt_BR linguas_ru linguas_sv linguas_zh linguas_zh_TW pam perl php (+)png ppds python samba slp (+)ssl static static-libs +threads (+)tiff usb xinetd zeroconf}                                                                                                                                                                 
     Installed versions:  1.4.8-r22!t[1](13:51:28 07/10/11)(X acl dbus gnutls jpeg kerberos ldap pam png slp ssl threads tiff usb -debug -elibc_FreeBSD -java -linguas_da -linguas_de -linguas_es -linguas_eu -linguas_fi -linguas_fr -linguas_id -linguas_it -linguas_ja -linguas_ko -linguas_nl -linguas_no -linguas_pl -linguas_pt -linguas_pt_BR -linguas_ru -linguas_sv -linguas_zh -linguas_zh_TW -perl -php -python -samba -static-libs -xinetd)                                               
     Homepage:            http://www.cups.org/
     Description:         The Common Unix Printing System

[U] net-print/cups-bjnp
     Available versions:  (~)1.0
     Installed versions:  0.5.5[?](11:52:42 23/02/11)
     Homepage:            http://sourceforge.net/projects/cups-bjnp/
     Description:         CUPS backend for the canon printers using the proprietary USB over IP BJNP protocol.

[I] net-print/cups-pdf
     Available versions:  2.4.8 (~)2.5.1-r1
     Installed versions:  2.5.1-r1(15:07:05 14/07/11)
     Homepage:            http://www.cups-pdf.de/
     Description:         Provides a virtual printer for CUPS to produce PDF files.

[I] net-print/libgnomecups
     Available versions:  0.2.3 0.2.3-r1 {debug}
     Installed versions:  0.2.3-r1(15:07:27 14/07/11)(-debug)
     Homepage:            http://www.gnome.org/
     Description:         GNOME cups library

[1] "sabayon" /var/lib/layman/sabayon

Found 5 matches.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Cups + Samba won't print.

Postby alexcortes » Fri Oct 14, 2011 3:53

Hi,

I try with your conf and specific packages versions and nothing changes.

Thanks!
User avatar
alexcortes
Baby Hen
 
Posts: 9
Joined: Thu Oct 06, 2011 19:34
Location: Rio de Janeiro/Brazil


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest

cron