No way to automatically migrate from printers.def to ntprinters.tdb
Gerald Carter
gcarter at valinux.com
Wed Mar 28 16:23:54 GMT 2001
Just as an FYI...
I have spent some time thinking about migration paths from point
and print support under 2.07 to the new support under 2.2.0.
I have reached the conclusion that it is impossible to automatically
convert a printers.def into the 2.2 TDB. Here is why...
2.0.x only supported Win9x printer drivers. Under 2.2, you must
install an NT driver first. While this is not an internal
requirement, it is the driver namespace problem described
in the Printing chapter of the Samba-HOWTO-Collection.
Basically, the sane thing is to require an NT driver be installed
first (both imprints and NT enforce this) so that the Win9x driver
can use the NT driver name. See the problem. A 2.0.x server will
have no NT drivers installed!
In order to help alleviate this problem, I've added some rough
support for a setdriver command in rpcclient (currently
only in the SAMBA_2_2 branch). The allows you do things like...
$ bin/rpcclient pogo -U root
INFO: Debug class all level = 1 (pid 17586 from pid 17586)
Enter Password : <pass>
Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
rpcclient $> enumdrivers
[Windows NT x86]
Printer Driver Info 1:
Driver Name: [HP LaserJet 4000 Series PS]
Printer Driver Info 1:
Driver Name: [HP LaserJet 2100 Series PS]
rpcclient $> enumprinters
flags:[0x800000]
name:[\\POGO\lp0]
description:[POGO\\POGO\lp0,HP LaserJet 2100 Series PS,]
comment:[Created by rpcclient]
rpcclient $> setdriver lp0 "HP LaserJet 4000 Series PS"
Succesfully set lp0 to driver HP LaserJet 4000 Series PS.
rpcclient $> getprinter lp0
flags:[0x800000]
name:[\\POGO\lp0]
description:[POGO\\POGO\lp0,HP LaserJet 4000 Series PS,]
comment:[POGO\lp0]
There still a few bugs (i just noticed one while writing this
message), but hopefully this will help admins who have those 183
printers served by Samba. :-)
Cheers, jerry
----------------------------------------------------------------------
/\ Gerald (Jerry) Carter Professional Services
\/ http://www.valinux.com/ VA Linux Systems gcarter at valinux.com
http://www.samba.org/ SAMBA Team jerry at samba.org
http://www.plainjoe.org/ jerry at plainjoe.org
"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )
More information about the samba-technical
mailing list