Penguin
Diff: SambaPrinting
EditPageHistoryDiffInfoLikePages

Differences between version 10 and revision by previous author of SambaPrinting.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 10 Last edited on Wednesday, July 2, 2003 12:16:22 pm by JohnMcPherson Revert
Older page: version 1 Last edited on Tuesday, January 28, 2003 1:29:25 am by DanielLawson Revert
@@ -1,13 +1,34 @@
 Some notes on printing and samba. 
  
-!!Drivers 
+  
+!!!Neat things you can do with samba and printing  
+  
+* For a way to get samba to print to a pdf then email you the result, see [SambaPDFPrinter]  
+  
+----  
+  
+!!! Using samba and [CUPS] - troubleshooting  
+  
+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  
+  
+----  
+  
+! !!Drivers for Windows clients  
  
 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! 
  
 !!RPCClient 
+ -- needs work  
  
 !!Imprints 
+ -- needs work  
  
 !!Add Printer Wizard 
  
 Win2k and WinNT have an Add Printer Wizard. You can use this to add printer drivers to your (cunningly disguised) Samba server. 
@@ -15,9 +36,9 @@
 I am using Samba 2.999+3.0.alpha21-3 (one of the Samba 3 Alpha's) 
  
 Steps: 
 * Configure your smb.conf appropriately. You'll want to add a section that looks like this: 
- [PRINT$] 
+ [ [PRINT$] 
  path = /home/samba/printers 
  guest ok = yes 
  browseable = yes 
  read only = yes 
@@ -26,9 +47,9 @@
  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 
-* Join the Win2k or WinNT machine to your domain. This is covered elsewhere - see [SambaPDC ]. This machine is referred to after this as the 'NT machine' for brevity. 
+* Join the Win2k or WinNT machine to your domain. This is covered elsewhere - see [SambaAsPDC ]. This machine is referred to after this as the 'NT machine' for brevity. 
 * Find a user you can use that has an (effective) uid of 0 on the samba server. Note: This doesn't mean you have to use the root user, its actually ok to set a printer admin and use that. 
 * Login as this user to the NT machine. 
 * Fire up the APW (Add Printer Wizard) and run through the wizard, adding appropriate drivers. You'll note that the 
 APW prompts you with 'The server doesn't have drivers for this printer, would you like to upload them now?' 
@@ -42,45 +63,47 @@
 You can have a look at whats happening on the server side of things with the rpcclient program 
  # rpcclient kiakaha -U root -c "enumdrivers" 
  Password: 
  
- [Windows 4.] 
+ [ [Windows 4.] 
  Printer Driver Info 1: 
- Driver Name: [Mita PointSource Vi300] 
+ Driver Name: [ [Mita ! PointSource Vi300] 
  
  Printer Driver Info 1: 
- Driver Name: [HP Color LaserJet 4550 PS] 
+ Driver Name: [ [HP Color ! LaserJet 4550 PS] 
  
  Printer Driver Info 1: 
- Driver Name: [Kyocera Mita KM-1810 KX] 
+ Driver Name: [ [Kyocera Mita KM-1810 KX] 
  
  
- [Windows NT x86] 
+ [ [Windows NT x86] 
  Printer Driver Info 1: 
- Driver Name: [Kyocera Mita KM-1810 KX] 
+ Driver Name: [ [Kyocera Mita KM-1810 KX] 
  
  Printer Driver Info 1: 
- Driver Name: [Mita PointSource Vi300] 
+ Driver Name: [ [Mita ! PointSource Vi300] 
  
  Printer Driver Info 1: 
- Driver Name: [HP Color LaserJet 4550 PS] 
+ 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\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\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] 
+ flags:[ [0x800000]  
+ name:[ [\\kiakaha\hpcolor]  
+ description:[ [\\kiakaha\hpcolor,HP Color ! LaserJet 4550 PS,lp2]  
+ comment:[ [lp2] 
  
 * Gotchas: For one of my drivers, it wouldn't let me upload a Win95/98 driver. No idea why, but it refused to let me do this. In the end, I right clicked on the background of the printers control panel app, and went to server properties, then manually added the printer driver there. I then removed and re-added the printer, and it now recognises the new driver. 
  
-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 
+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.  
+  
+----