-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jonathan Laventhol wrote:
| Hello All --
|
| We are trying to consolidate our printer
| management from a series of NT print servers
| to a series of Samba ones, in a global
| network with ten offices and about 150 printers.
| All printing is PostScript and goes to HP
| and Canon printers over lpd through custom
| 'if' filters which do accounting.
|
| To help this we're trying to automate the
| printer and driver registration processes, in
| particular make the nt_printers.tdb, ntdrivers.tdb
| (and ntforms.tdb?) files from some kind of
| textual config file which might look like this:
|
| pr-london1: hp2200
| pr-newyork3: hp4000
| ...
|
| Our goal is to bring our printing in line
| with our other configuration management, which
| has a central server of configs for routers,
| servers and so on. The config server
| doesn't run any applications and so can't have
| Samba running on it to receive rcpclient requests.
|
| Anybody achieved anything like this? Any
| developer got some half-working code? We
| were hoping to use tdbtool or similar.
|
| Alternatively, does anybody have good
| documentation about what is expected in the
| printing tdb files?
|
| We're using Samba 2.2.2 on FreeBSD 4.various.
This is really a rat's nest to change. First you would
be better looking at 3.0.11. The printing db used to
store information regarding printers are
ntdrivers.tdb => installed drivers
ntprinters.tdb => printer_info_2 structures
and security descriptors
ntforms.tdb => installed paper sizes
It is not currently designed to allow you to
drop in a new storage backend, but it could be done.
Look at get_a_printer(), get_a_driver(), and other
high level functions in printing/nt_printing.c.
These are the somewhat rough api functions for
retrieving and updating printing and driver information.
Stay away from printing.c. the printing/*tdb files are
just cache files.
The actual structures describing what is stored in the
various printing tdbs is in include/{rpc_spoolss.h,nt_printing.h}
The main problem I see with your solution is maintaining it.
You'll have to track any internal API changes we make in
future versions which we've been known to do.
And in case you are thinking of digging in the actual
tdb files themselves, that is a really bad idea for the
same reason. It's better if you can manage the printers
on the Samba box via the spoolss rpcs (python binding,
rpcclient, win32 code, etc...)
If you need any more details, it's probably best to move the
discussion over to the samba-technical mailing list.
cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCFN8xIR7qMdg1EfYRAqkaAKClzY6jGD0YNT9bkZDU9TclYML11wCfRHU0
tg8AswGP6I+b8GZ4M0ikeoA=epO4
-----END PGP SIGNATURE-----