[cups.general] BrowsePoll and PPD with samba Point and Print ...

pipitas k1pfeifle at gmx.net
Wed Dec 22 08:46:26 PST 2004


L. Amina wrote:

>> My problem now, is to minimize admin, I have started using BrowsePoll
>> for printers from my remote site to local site for central printer
>> accessing, which works nice for printers that have there native drivers
>> installed, but the BrowsePoll does not seem to transfer the PPD files
>> from the remote site to the local site, 

No it doesnt, but it doesnt need to either. Even "normal" printer 
browsing doesnt transfer PPD files.

>> so I can't do a cupsaddsmb 
>> without reinstalling the printer locally ...

Oh yes you can!   ;-)

The Windows client would see as a result the printers they installed from
their Samba server as "printername at cupsserver on sambaserver".

Set up your smb.conf as indicated by "man cupsaddsmb". Then try this, from
any Linux client on your net:

  cupsaddsmb -H samba-server -U samba-user -h cups-server -v printername

Of course, you need to have a few pre-conditions in place:

0) Your printername" mustnt be a "raw" printer, and its "printername.ppd"
   must have successfully passed the "cupstestppd" check.

1) your smb.ocnf setup must be correct (regarding the [print$] share,
   and a few other items outlined in the cupsaddsmb manpage).

2) your "samba-user" needs to have an account on "samba-server",
   and needs to belong to the Samba "printer admin" group.

3) your printer driver files (Adobe PostScript and/or CUPS PostScript for
   NT/XP/2K) must be deposited into the directory "/usr/share/cups/drivers/" 
   of your local workstation (from where you run cupsaddsmb).

For an illustration about what goes on during you run this command, see

   http://samba.vernstok.nl/htmldocs/howto/images/14small.png

For a detailed description about what goes on during you run this 
command, see

   http://samba.vernstok.nl/htmldocs/howto/CUPS-printing.html#id2560323

Caveat: depending on your version of CUPS and cupsaddsmb, you may
need to use different CUPS PostScript driver files.

>> Is there and option or 
>> something that I can do ( short of reinstall each printer locally ),
>> which will be able to do this automatically ...

Once you prepared everything, a

  cupsaddsmb -H samba-server -U samba-user -h cups-server -v -a

will install *all* printer drivers into the Samba [print$] share for the
Windows clients to download and install via "Point'n'Print".

Alternatively, you could auto-install the printers (with the drivers)
by means of a logon script for your Windows users (if they are part
of a domain.)

>> Plus, I was wondering if there is a way to get Samba and CUPS to to
>> speak better to one another.  When CUPS gets a new printer, it installs
>> it into Samba?  Would be great to have this ...

Most recent Samba versions had a bug that prevented from it from
seeing and updates (additions or deletions) in the CUPS printer
list.

It is said to be solved in the most recent (3.0.10) Samba release.

To work around that, send a HUP to all running smbds so that they
update their printer lists:

  "kill -HUP `pidof smbd`"

However, even if a printer is appearing in the "Printers and
Faxes" share, you still need to run "cupsaddsmb" to provide an
appropriate driver for the Windows clients.

If you want to add a bit more automatism, you could write a little 
wrapper script around "lpadmin" that does the following 3 steps:

  1. run lpadmin to install a new CUPS printer
  2. kill -HUP `pidof smbd` to make Samba aware of the new
     printer
  3. run cupsaddsmb -H samba-server -h cups-server -U samba-user newprintername

That should then auto-prepare each new CUPS printer as a Samba
printer with the right drivers.

>> Mailed
>> Lee

Cheers,
Kurt





More information about the cups mailing list