Hello.
I managed to get this to work, with a lot of help from
http://us2.samba.org/samba/docs/man/Samba-HOWTO-Collection/classicalprinting.htmlHere's how.
pico /etc/samba/smb.conf
(because as far as I can see there's no template for this)
Change one line in the [global] section
printer admin = admin, Administrator, root, @root
Change one line in the [printers] section
[printers]
...
use client driver = no
Change the [print$] section to:
[print$]
comment = Printer drivers
path = /home/e-smith/files/samba/printers
guest ok = Yes
browseable = Yes
use client driver = No
read only = Yes
write list = admin, Administrator, root, @root
Save smb.conf and restart samba
service smb restart
Now log on to one of your Windows workstations (I'm using windows 2k, it may be slightly different on other versions)
[1] Start > Run
[2] Type:
//servername
in the dialog box (replace servername with the name of your server.)
[3] Open "printers"
[4] Right-click your printer. When the dialog pops up asking if you want to install a driver, click no, then click the "Advanced" tab.
[5] Click the "New Driver" button. Follow the wizard and install the driver
[6] If you want to specify default print settings, click "Printing defaults" from the advanced tab.
Finally, so that you don't have to install the print driver on every windows workstation on the network, you can simply add the following lines to your netlogon.bat file for each printer you want to install:
pico /home/e-smith/files/samba/netlogon/netlogon.bat
...
rundll32 printui.dll,PrintUIEntry /dn /n "\\servername\printername" /q
rundll32 printui.dll,PrintUIEntry /in /n "\\servername\printername" /q
rundll32 printui.dll,PrintUIEntry /y /n "\\servername\printername" /q
The first line deletes the printer from the local machine
The second line adds it to the local machine
The (optional) third line sets the printer as the default printer.
There's no easy way to check if a printer has been already installed or not, and the above script only takes a couple of seconds to execute.
For a complete list of Win32 shell print commands, execute the following from the command line:
rundll32 printui.dll,PrintUIEntry /?
Hope that helps.
Cheers,
Silas