Geoffrey Scott
2006-Jan-12 11:58 UTC
[Samba] windows print migrator + "add printer command"
Hi all. I was wondering if anyone had a successful exampel of using the "add printer command" with cups so that the windows print migrator could be utilised. Seeing as Jerry as spent time on this it would be a shame not to know how to use it. ;-) I'm guessing that it would be along the lines of: add printer command = lpadmin option1 option2 && cupsaddsmb option1 but am currently unsure how to proceed. Can someone hit me with a clue by four? cheers geoff
Martin Zielinski
2006-Jan-12 13:58 UTC
[Samba] windows print migrator + "add printer command"
Geoffrey Scott wrote:> Hi all. > > I was wondering if anyone had a successful exampel of using the "add > printer command" with cups so that the windows print migrator could be > utilised. Seeing as Jerry as spent time on this it would be a shame not to > know how to use it. ;-) > > I'm guessing that it would be along the lines of: > add printer command = lpadmin option1 option2 && cupsaddsmb option1Should really be that easy :-)> > but am currently unsure how to proceed. Can someone hit me with a clue by > four? > > cheers geoffI have 2 reasons why I'm not using a simple script like the above for years: 1st, the add_printer_hook is called by a "update_printer" function. This function is called really frequently. Using an add printer command and not commenting this line out of the samba code slowed down everything in a massive way. 2nd, (and the true reason) - the add printer command is not really functional without port handling. E.g. CUPS wants a device uri like "socket://192.168.3.100:9100" to know the destination of the printjob. You could use the "location" or "description" in the add printer wizard as a workaround. But that's not really a nice way. So to make your "lpadmin option1 ..." line really functional, you'll also need an "enumports comand" and the ability to create new ports and keep them in sync with the cups printers. bye, Martin -- Martin Zielinski mz@seh.de Software Development SEH Computertechnik GmbH www.seh.de
Gerald (Jerry) Carter
2006-Jan-12 15:42 UTC
[Samba] windows print migrator + "add printer command"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Geoffrey Scott wrote:> Hi all. > > I was wondering if anyone had a successful exampel of using the "add > printer command" with cups so that the windows print migrator could be > utilised. Seeing as Jerry as spent time on this it would be a shame not to > know how to use it. ;-) > > I'm guessing that it would be along the lines of: > add printer command = lpadmin option1 option2 && cupsaddsmb option1The main thing that I found when migrating printers is to make sure that your add printer script can handles spaces in names. There's also a little bit of a data model problem in that Windows creates subkeys in the registry based on printer name and Samba uses the share name. The best solution is a little prep work that renames the printer names to the share name and then you can reset the printer name after migration. Drivers and printer settings migrate without any difficulty. cheers, jerry ====================================================================Alleviating the pain of Windows(tm) ------- http://www.samba.org Centeris ----------- http://www.centeris.com "There's an anonymous coward in all of us." --anonymous -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDxnjKIR7qMdg1EfYRAszaAJ46DZ8vIOANwUloyyf3BVW0dWbasgCg2qBs 2J0DDnidJLrG9x3EgJVVj6I=nUNb -----END PGP SIGNATURE-----
Gerald (Jerry) Carter
2006-Jan-12 15:44 UTC
[Samba] windows print migrator + "add printer command"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Geoffrey Scott wrote:> I was wondering if anyone had a successful example of using > the "add printer command" with cups so that the windows > print migrator could be utilized. Seeing as Jerry as spent > time on this it would be a shame not to know how to use > it. ;-)One real advantage is to use print migrator to backup a large number of drivers into a cab file. This might be as useful to prep new servers. cheers, jerry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDxnkzIR7qMdg1EfYRAiMFAJoDVHhAoUAm+/3cSWzCbe/9cf9flgCgsyPU NUCtIxsr3cKd/k/s74zvf+M=4LpX -----END PGP SIGNATURE-----
Geoffrey Scott
2006-Jan-12 21:38 UTC
[Samba] windows print migrator + "add printer command"
Geoffrey Scott wrote:> Hi all. > > I was wondering if anyone had a successful exampel of using the "add > printer command" with cups so that the windows print migrator could be > utilised. Seeing as Jerry as spent time on this it would be a shame notto> know how to use it. ;-) > > I'm guessing that it would be along the lines of: > add printer command = lpadmin option1 option2 && cupsaddsmb option1The main thing that I found when migrating printers is to make sure that your add printer script can handles spaces in names. There's also a little bit of a data model problem in that Windows creates subkeys in the registry based on printer name and Samba uses the share name. The best solution is a little prep work that renames the printer names to the share name and then you can reset the printer name after migration. Drivers and printer settings migrate without any difficulty. cheers, jerry ==================================================================== Um, I really do appreciate the background info and pointers. but i was hoping you might be kind enough to post your add printer script so that i can get up and running quickly..... Please.... please, please, please... It seems obvious that you have acheived this in testing. i googled for exampels of the add printer command but could find none..... Or is this an exercise for the reader? ;-) Cheers Geoff
Geoffrey Scott
2006-Jan-12 22:42 UTC
[Samba] windows print migrator + "add printer command"
Gerald (Jerry) Carter wrote:> Geoffrey Scott wrote: > >> Um, I really do appreciate the background info and pointers. but I >> was hoping you might be kind enough to post your add printer script >> so that i can get up and running quickly..... > > I use cups so the scripts in samba/examples/scripts/printing/cups/ > is what I used in testing. Those don't have printer names with > spaces but otherwise worked fine. > > cheers, jerry<thud!> Ouch, that was the clue by four hitting me on the back of the head.... Thanks Jerry! I'll check them out. Cheers Geoff
Geoffrey Scott
2006-Jan-14 22:06 UTC
[Samba] windows print migrator + "add printer command"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Martin Zielinski wrote :> I just tried out to add a port on two MS systems and it *looks* like it > could work with SPOOLSS calls. Unfortunatly some of the packets are not > decoded by Ethereal. > > Looks like this: > --> EnumMonitors > <-- Response: ... Standard TCP / IP Port > --> OpenPrinterEx \\host\,XcvMonitor Standard TCP / IP Port > <-- Response OK > --> UNKNOWN (Opnum 88) You can read "AddPort ... IP_xxxxx ... public ...") > <-- UNKNOWN > --> ClosePrinterEx > > Or are these the registry calls you mentioned?I'm having problems with this as well. What I am seeing; and this is after having successfully added a printer using the add printer command + the example script you suggested; is that 1. I am asked for a username and password. 2. The rights are then granted and then nothing happens. It complains that it can't stop and then start the spools service on the target server (samba 3.21a Debain sarge) i went back over the setup a number of times and removed spaces from the share names and added socket://xxx.xxx.xxx.xxx:9100 to the location section of the printers before backing them up to a printers.cab. I left spaces in names elsewhere, (you can't have spaces in the share name due to the expectations of CUPS). The utility consistently fails to add the printers to the target server. Hopefully this info is of some use otherwise I'll try to get an ethereal trace and send it to you. Cheers Geoff.
Aarti Varshney (asadhnan)
2006-Jan-26 16:54 UTC
[Samba] windows print migrator + "add printer command"
hi Geoff, Looks like you have figured out how to use the printmig.exe. Can you please give me some pointers: I am trying to migrate print queues from a windows server to a samba share. this is what I did: 1. I ran printmig.exe on the windows server. 2. Backed up the printers on the windows servers to a cab file. 3. Tries to restore the printers to the sambashare by specifying the target as //sambaShare. But I get the following error: 2006:01:25 15:35:38 Access Granted to: \\sambaShare <file://sambaShare/> 2006:01:25 15:35:38 Couldn't start the target spooler 2006:01:25 15:35:38 Remote Tree View Failed How do I starter the target spooler? Do I need some config in smb.conf? In smb.conf I have a addprinter command. Thanks, Aarti.
Geoffrey Scott
2006-Jan-31 00:55 UTC
[Samba] windows print migrator + "add printer command"
Aarti Varshney (asadhnan) wrote:> hi Geoff, > > Looks like you have figured out how to use the printmig.exe.No I didn't. :-( I had no issues at all using the add/remove printer scripts that are in the example docs. So I could add and remove printers from a windows workstation without problems. Make sure that you read through the scripts before use. You can figure out from them where spaces in names are allowed and where they aren't.> Can you please give me some pointers: > I am trying to migrate print queues from a windows server to a samba > share. > > this is what I did: > 1. I ran printmig.exe on the windows server. > 2. Backed up the printers on the windows servers to a cab file. > 3. Tries to restore the printers to the sambashare by specifying the > target as //sambaShare. But I get the following error: > > 2006:01:25 15:35:38 Access Granted to: \\sambaShare > <file://sambaShare/> > 2006:01:25 15:35:38 Couldn't start the target spooler > 2006:01:25 15:35:38 Remote Tree View Failed > > How do I starter the target spooler?Well no such spooler exist AFAIK. I was hoping jerry could spread some enlightenment but he never came back to this thread. I haven't had time to do an ethereal trace on this lately due to server crashes (bad hardware)> Do I need some config in smb.conf? > In smb.conf I have a addprinter command.Jerry reckons that you only need a working add printer command. Have you tested adding a printer by itself, and not using the print migrator? I just assumed that I must be doing something wrong. So I gave up and did each printer manually.> Thanks, > Aarti.
Aarti Varshney (asadhnan)
2006-Jan-31 01:18 UTC
[Samba] windows print migrator + "add printer command"
Thanks Geoff for getting back to me. I believe my add printer command is working because net rpc migrate printer commands work fine when run on the samba server. And when I add a printer using the APW from windows it works. -----Original Message----- From: Geoffrey Scott [mailto:geoffs@guestshire.com] Sent: Monday, January 30, 2006 7:55 PM To: Aarti Varshney (asadhnan); samba@lists.samba.org Subject: RE: [Samba] windows print migrator + "add printer command" Aarti Varshney (asadhnan) wrote:> hi Geoff, > > Looks like you have figured out how to use the printmig.exe.No I didn't. :-( I had no issues at all using the add/remove printer scripts that are in the example docs. So I could add and remove printers from a windows workstation without problems. Make sure that you read through the scripts before use. You can figure out from them where spaces in names are allowed and where they aren't.> Can you please give me some pointers: > I am trying to migrate print queues from a windows server to a samba > share. > > this is what I did: > 1. I ran printmig.exe on the windows server. > 2. Backed up the printers on the windows servers to a cab file. > 3. Tries to restore the printers to the sambashare by specifying the > target as //sambaShare. But I get the following error: > > 2006:01:25 15:35:38 Access Granted to: \\sambaShare > <file://sambaShare/> > 2006:01:25 15:35:38 Couldn't start the target spooler > 2006:01:25 15:35:38 Remote Tree View Failed > > How do I starter the target spooler?Well no such spooler exist AFAIK. I was hoping jerry could spread some enlightenment but he never came back to this thread. I haven't had time to do an ethereal trace on this lately due to server crashes (bad hardware)> Do I need some config in smb.conf? > In smb.conf I have a addprinter command.Jerry reckons that you only need a working add printer command. Have you tested adding a printer by itself, and not using the print migrator? I just assumed that I must be doing something wrong. So I gave up and did each printer manually.> Thanks, > Aarti.