Some notes on printing and samba.
NOTE - In redhat 9 users have reported needing to add the following 3 lines to the printer section of the smb.conf
This fixes the problem where the windows clients can see the printer and connect to it, but not print to it or see the print queue. This is because CUPS apparently uses a slightly different syntax than the older BSD-based lp* programs.
print command = lpr -P %p -o raw %s -r lpq command = lpstat -o %p lprm command = cancel %p-%j
There are a few ways you can arrage for your samba server to automagically have windows drivers for the printers it shares. I'll describe one of them below (Add Printer Wizard); there are other ways however!
-- needs work
-- needs work
Win2k and WinNT have an Add Printer Wizard. You can use this to add printer drivers to your (cunningly disguised) Samba server.
I am using Samba 2.999+3.0.alpha21-3 (one of the Samba 3 Alpha's)
Steps:
[PRINT$?
path = /home/samba/printers guest ok = yes browseable = yes read only = yes write list = @wheel,root,daniel,admin admin users = @wheel,root,daniel,admin create mask = 0644 directory mask = 0755
Note that the path can be anywhere, really. All that matters is that the permissions are set appropriately. I set them to 777 for the purpose of this exercise: this may not be neccesary
APW prompts you with 'The server doesn't have drivers for this printer, would you like to upload them now?'
You can have a look at whats happening on the server side of things with the rpcclient program
Password:
[Windows 4.0?
- Printer Driver Info 1
Driver Name: [Mita !PointSource Vi300?
- Printer Driver Info 1
Driver Name: [HP Color !LaserJet 4550 PS?
- Printer Driver Info 1
Driver Name: [Kyocera Mita KM-1810 KX?
[Windows NT x86?
- Printer Driver Info 1
Driver Name: [Kyocera Mita KM-1810 KX?
- Printer Driver Info 1
Driver Name: [Mita !PointSource Vi300?
- Printer Driver Info 1
Driver Name: [HP Color !LaserJet 4550 PS?
- rpcclient kiakaha -U root -c "enumprinters"
- Password
flags:[0x800000? name:[\\kiakaha\km1810? description:[\\kiakaha\km1810,Kyocera Mita KM-1810 KX,lp? comment:[lp?
flags:[0x800000? name:[\\kiakaha\mita? description:[\\kiakaha\mita,Mita !PointSource Vi300,lp1? comment:[lp1?
flags:[0x800000? name:[\\kiakaha\hpcolor? description:[\\kiakaha\hpcolor,HP Color !LaserJet 4550 PS,lp2? comment:[lp2?
Its also worth pointing out that for the APW to work, you NEED NT or 2K drivers for the printer, even if you only want to share to Win98 Clients.
4 pages link to SambaPrinting: