-- This howto will implement a printer server for windows clients. The postscript drivers will be automatically downloaded and installed on the first request. It will not implement security, all users will be able to print. For security privileges, see samba help.
1 - Install:
-- Samba
-- Cups
2 - Install the printer PPD driver and the generic postscript drivers:
Go to
www.cups.org and download the PPD driver for your printer (ex.: For an HP 4300N download hp4300_7.ppd.gz) then copy it to /usr/share/cups/model/.
For the generic postscript drivers:
Download
Cups_drivers , unzip and copy them to /usr/share/cups/drivers/
3 - Install the printer
use:
#/usr/sbin/lpadmin -p (printername) -E -v (device) -m (PPD_File)
For a network printer (my example case):
#/usr/sbin/lpadmin -p HP4300N -E -v socket://10.1.5.132:9100 -m hp4300_7.ppd.gz
restart cups:
#service cups restart
4 - Samba
#mkdir /etc/samba/drivers/
edit /etc/samba/smb.conf and put that:
[global]
printing = cups
printcap name = cups
security = user
[printers]
browseable = no
printable = yes
path = /var/spool/samba
comment = All Printers
public = yes
printer admin = root
use client driver = no
[print$]
comment = Printer Drivers
public = yes
path = /etc/samba/drivers
write list = root
resart samba:
#service smb restart
5 - cupsaddsmb
This command will copy the cups and postscripts drivers and the PPD file to /etc/samba/drivers and the clients will
be able to download them.
First create a root samba account with password:
# smbpasswd -a root
then:
# cupsaddsmb -U root -a -v (it ll be necessary the root password above)
Now change the security=user to security=share in smb.conf and restart samba. To do a guest access, the security
must be 'share'. If u need to create more printers shares, change again to security=user to run cupsaddsmb.
6 - The end
Go to a windows machine, type in windows explorer : //(linux printer host) and doubleclick the printer share to install it.