[Samba] roaming profiles ok, but what about the printers?

Andreas Paulick paulick at faro.de
Sat Sep 4 11:20:47 GMT 2004

I've got some inspirations from the archive of lists.samba.org and I'm
writing a little shell-wrapper around the print-command.
Because I have'nt access to the server right now I write this from memory:

Browseable = no
#don't show the real printers

printeable = yes
print command = script.sh laser %s %m %u

printeable = yes
print command = script.sh laser2 %s %m %u

printeable = yes
print command = script.sh color %s %m %u

The printshares are only for smb.conf There are no such printers called
LASER, LASER2 oder COLOR. on this Server. It's "virtual Printers" like

the shell-wrapper script.sh:

#4 Parameter: $1-$4. giving to the script at calling time
#$1 = which Share used
#$2 = spool-file in /var/temp = datas to pPrint
#$3 = netbiosname of the calling client
#$4 = User

cause $3 in
client01  )
             cause $1 in
              laser ) lpr -d hplj2300 $2 ;;
              laser2 ) lpr -d kyo3800 $2 ;;
              Color ) lpr -d canoni960 $2 ;;
client02  )
             cause $1 in
              laser ) lpr -d kyo3800 $2 ;;
              laser2 ) lpr -d hplj2300 $2 ;;
              Color ) lpr -d canoni960 $2 ;;
client03  )
             cause $1 in
              laser ) lpr -d hplj6 $2 ;;
              laser2 ) lpr -d hplj6 $2 ;;
              Color ) lpr -d Minolta3100 $2 ;;

All printers in the lpr-command must be exist. The clients only sees the
3 Printer LASER, LASER2 and COLOR and use them with generic
postscript-driver. At the samba server runs also a printserver and it
cares via ghostscript about the translation
to the the printer.
New Printers will be installed only at the linux-server, the name will
written in the script.sh and 'done'. No changes necessary at the
Clients. So easy can also substituted a printer :)

I have to optimise and test this etc. then should it running.

B.t.w.: which generic windows-printerdriver would you suggest?
Maybe 'Apple Laserwriter 600 PS' or 'HP Laserjet PS' ?
Or use you the vendor windows-printerdriver and print at rawdriver on

Andy P.

More information about the samba mailing list