Serving windows print drivers with Samba+CUPS (Was: CUPS +)

César Amaya csar at 123.com.sv
Fri Jan 12 22:26:15 UTC 2007


> 1 - Setup CUPS, add printers using RAW queues, Setup Samba, tell it to 
> use cups for printing
>
> 2 - Setup a shared location for printer drivers from Samba, the share 
> can be pretty much anywhere on your local FreeBSD filesystem, and can 
> use all the options of any other file-share, but must be shared from 
> Samba with the name 'print$'. Something similar to this inside your 
> smb.conf should suffice:
>
> [print$]
> comment = Windows Client Printer Drivers
> path = /var/db/windows_printers
> browseable = yes
> guest ok = yes
> read only = yes
> write list = root Administrator @"Domain Admins" @"Printer Admins"
>
> 3 - Login from a Windows client, to the Samba server using an 
> administrator login (as specified in the write list for print$). Goto 
> the 'Printers' section, NOT the direct queue mapping, for example:
> \\samba1\Printers NOT \\samba1\some_printer. When in the printers 
> folder, right-click the printer you wish to add the drivers to, and 
> you can add them from the windows properties dialog like you would any 
> printer. This will upload the drivers to the samba [print$] share for 
> other clients to use.
>
> 4 - From another samba client running windows, goto 
> \\samba1\some_printer and it will prompt if you wish to 'Connect to 
> printer', simply say yes - and that client should use the windows 
> drivers directly from the samba [print$] share without further prompting.
>
> There are some issues, and it's not just as simple as 4 easy steps... 
> but this is the general process to go through, with a little reading 
> from the Samba website/documentation you should be able to get it 
> going. Feel free to drop another message back to the list if you run 
> into more questions from there.
>
> -- 
> Nathan Vidican
It does not worked for me.

This is my smb.conf file and my cupsd.conf

printserver# cat smb.conf
[global]
   workgroup = AmnetDatos
   server string = Print Server
   printcap name = cups
   load printers = yes
   printing = cups
   browseable = yes
   log file = /var/log/samba/log.%m
   max log size = 50
   hosts allow = 192.168.10. 127.
   security = share
   encrypt passwords = yes
   smb passwd file = /usr/local/etc/samba/smbpasswd
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = no
   log level = 4

[print$]
   comment = Printer Drivers
   path = /usr/local/share/cups/drivers
   browseable = yes
   guest ok = no
   read only = yes
   write list = root Administrator @"Domain Admins" @"Printer Admins"

[HPDatos]
   comment = HP Laser Jet 4000
   printable = yes
   path = /var/spool/samba
   guest ok = yes
   public = yes
   printable = yes
   printer admin = root

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


printserver# cat cupsd.conf
LogLevel info

# Administrator user group...
SystemGroup wheel

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

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
#BrowseAllow @LOCAL
BrowseAllow 192.168.10.*

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

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

# Restrict access to the admin pages...
<Location /admin>
  Encryption Required
  Order allow,deny
  Allow localhost
  Allow 192.168.10.251
</Location>

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

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an adminstrator...
  <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>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an adminstrator to authenticate...
  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes 
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-Add-Printer CUPS-Delete-Printer CUPS-Add-Class 
CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
    AuthType Basic
    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>

do you see something wrong in my configuration?



More information about the freebsd-questions mailing list