Re: [Samba] Samba] Samba3 Printer drivers installation

2004-01-30 Thread Kurt Pfeifle
Andrei Mikhailovsky wrote:

[]

|> When I was initially installing the drivers, I was following a how-to
|> that didn't specify that you need exact order for the driver files.
|>
|
| It does. It does so in very much detail. I spent my complete annual
| holiday last summer to find everything out and write it down as a
| documentation. So don't tell me it doesn't specify the exact order,
| because I know it went into my draft at more than 1 place.
|
Sorry for not making it clear earlier on, I have followed a 3rd party
how-to that i've found by google-ing.
So why am *I* receiving the support call for that 3rd party doco??

[...]

As far as i can see from the how-to the server side setup is finished.

Now, from the client side, i should double click on the printer
This is not a piece I ever advocated, exactly because it doesn't
work reliably. Re-read the docu and find the following steps (quoted
from memory).
* browse to Samba in network neighbourhood.

* open "Printers and Faxes" folder

* right-click printer and select "Connect..." or "Install..."

 and
windows should fetch the driver and install it. When I do this, windows
2000/XP responds that unable to find driver, do you want to make a local
search for driver. However, if i check the properties for the printer, i
can see that the driver is there and that it is available for the right
architecture.
Find the different places which (redundantly) hint to the need to...

* make sure to do the first installation on any Win client as a
  "printer admin" user, and
* tickle the driver into a valid device mode by "executing" it once
  on a Win machine, before you start offering it to normal users for
  download/installation
--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba] Samba3 Printer drivers installation

2004-01-30 Thread Andrei Mikhailovsky
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Kurt Pfeifle wrote:
| Andrei Mikhailovsky wrote:
|
|> Thanks a lot for the help.
|>
|
| Please always reply to list. Often I don't get private mails while I
| am on travel. But sometimes I can scan the list (via its web interface)
| while "on the road".
|
|> When I was initially installing the drivers, I was following a how-to
|> that didn't specify that you need exact order for the driver files.
|>
|
| It does. It does so in very much detail. I spent my complete annual
| holiday last summer to find everything out and write it down as a
| documentation. So don't tell me it doesn't specify the exact order,
| because I know it went into my draft at more than 1 place.
|
Sorry for not making it clear earlier on, I have followed a 3rd party
how-to that i've found by google-ing. After i have followed your how-to
(for which I am very thankful) I've managed to install printer drivers.
I've followed the following procedure:
1. to get windows drivers files i've used:
rpcclient -U'user%pass' -c \
'getdriver "Samsung 4500" 3' TURBO_XP
2. Then i've downloaded drivers from windows machine:
smbclient //TURBO_XP/print\$ -U'user%pass' \
~   -c 'cd W32X86/2; mget *'
3. Upload files to samba print$:
smbclient //SAMBA-CUPS/print\$ -U'user%pass' -c \
~  'cd W32X86; mput *'
4. Added printer driver:

rpcclient -Uuser%pass -c 'adddriver "Windows NT x86" \
~  "Samsung: file1:file2,etc.."'
where the file order is as following:
Driver File Name:Data File Name:Config File Name:Help File Name:Language
Monitor Name:Default Data Type:
The driver files where added successfully:
Printer Driver Samsung successfully installed
5. Checking samba server for driver succeded:
rpcclient -U'user%pass' -c 'enumdrivers' SAMBA-server
[Windows NT x86]
Printer Driver Info 1:
~Driver Name: [Samsung]
6.Setting driver to printer:
rpcclient -U'user%pass' -c 'setdriver Samsung Samsung' SAMBA-server
As far as i can see from the how-to the server side setup is finished.

Now, from the client side, i should double click on the printer and
windows should fetch the driver and install it. When I do this, windows
2000/XP responds that unable to find driver, do you want to make a local
search for driver. However, if i check the properties for the printer, i
can see that the driver is there and that it is available for the right
architecture.
But if I use the windows Add printer wizard to install the same driver
to samba print$ share, the printer driver gets installed perfectly; i.e.
rpcclient -U'user%pass' -c 'enumdrivers' SAMBA-server
[Windows NT x86]
Printer Driver Info 1:
~Driver Name: [Samsung]
as well as the drivers are placed in exactly the same location as they
where using samba setup procedure that i've mentioned above. I don't
actually know what might be the difference between the driver
installation between windows Add printer wizard and samba rpcclient.
Do you have any idea what I am doing wrong? As I prefer not to use
windows at all possible costs, i would really like to sort out the
printer installation by using command line on linux rather then
fluff-clicking on windows.
Thanks for all the help!

- --
Andrei Mikhailovsky
Arhont Ltd
Web: http://www.arhont.com
Tel: +44 (0)870 4431337
Fax: +44 (0)1454 201200
PGP: Key ID - 0xFF67A4F4
PGP: Server - keyserver.pgp.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
iD8DBQFAGwJN5bSBOf9npPQRAvh8AJ4joCafdHQkRN6bHqKGeVr+HHNd6gCbB9J7
k90ycWdpLfh59fF+KgrZtGM=
=+Ii3
-END PGP SIGNATURE-
--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Samba] Samba3 Printer drivers installation

2004-01-25 Thread Kurt Pfeifle
[Samba] Samba3 Printer drivers installation
Andrei Mikhailovsky andrei at arhont.com
Tue Jan 20 11:52:41 GMT 2004
Hello,

I am having problems installing printer drivers for Samsung ML-4500 
printer, so windows workstation can just fetch them from print$ share. 
When I run rpcclient with -d 4 i get the following error:

whale:/home/samba/home# rpcclient -d 4 -Uroot% -c 'adddriver 
"Windows NT x86" 
"SSGK2:ssgk2.cnt:ssgk2.dat:ssgk2.dll:ssgk2.hlp:ssgk2.ini:ssgk2.sdd:ssgk2su.dll:ssgk2ui.dll:ssgk2um.dll' 
WHALE
Your command is wrong. I can see this by just counting the "colons" in
it. There must be exactly 7 colons -- yours has 9!
[]

result was WERR_INVALID_PARAM

Does anyone know what the problem is
Yes.

and how to fix it?

Use the correct syntax  :-)

It is described here

http://samba.vernstok.nl/htmldocs/CUPS-printing.html#id2562523

in very great detail, as well as at many other places, like "man rpcclient"
(search for "adddriver"). Admittedly, it is not very simple, so I'll try to
explain again.
The man page quotes this:

   adddriver   []

 is the Win architecture family. It may be either "Windows NT x86"
(which stands for Windows NT 4.0, Windows 2000/2003 and Windows XP) or
"Windows 4.0" (which represents Windows 95/98/ME). You need to use the
quotes because of the spaces in the string.
 is the long string, containing 8 separate fields, separated by
7 colons. The last field may contain either "NULL", or a list of additional
driver files *separated by commas*. All this 8 fields must be filled in,
none may be empty (in which case the "NULL" needs to go in), and they need
to be filled in in the correct order. The correct order is this:
   LongDriverName:DriverFileName:DataFileName:ConfigFileName:HelpFileName:LanguageMonitorName:DefaultDataType:Comma-Separated-list-of-Files

The LanguageMonitorName field should contain "NULL". The DefaultDataType
for Samba and NT72K/XP clients is "RAW". To find out which files are which
type, use one of these commands to query an existing NT/2000/XP workstation
with the same driver installed locally (and sharing the printer):
   rpcclient -U'Administrator' -c 'enumdrivers 3' name-of-remote-win-workstation
   rpcclient -U'Administrator' -c 'getdriver printername 3' 
name-of-remote-win-workstation
The output should show you the correct mapping of driver files to the types
described above (using similar nomenclatura, albeit not exactly the same,
but enough to guess). Note that the list of the "Dependent Files" is what
needs to go, comma-separated, into the last of the 8 mentioned fields in
the adddriver subcommand to rpcclient.
Lastly (AND VERY IMPORTANT!!): all the files you name in the adddriver command
need to be present in [print$]/W32X86/  *before* you run the command. Note,
that the successful command will create a sub-directory named "2" (or "3",
if you use a "version 3", non-kernel-mode driver for 2000/XP) and move the
files there. A partially successful adddriver command could have moved away
a part of the files, and therefor you need to put the files again into the
original location, before you can try again:
Finally, here are 4 examples for a working "rpcclient adddriver" command:

 1 ---
  rpcclient -U'Administrator%' -c 'adddriver "Windows NT x86" \
  "HP LaserJet 8100:\
  cupsdrvr.dll:\
  mopi.ppd:\
  cupsui.dll:\
  cups.hlp:\
  NULL:\
  RAW:\
  NULL"'\
  TURBO_XP
# This command installs the NT/2000/XP CUPS driver into a Windows XP
# Professional workstation named "TURBO_XP", when it is run from any
# Samba machine, and if the files had been placed into (UNC-Notation follows)
# "\\turbo_xp\print$\W32X86\" previously (by, for example an appropriate
# smbclient command) or (path specific to my own system follows)
# into "C:\WINDOWS\SYSTEM32\SPOOL\drivers\W32X86\"
--
- 2 --
  rpcclient -U'Administrator%' -c 'adddriver "Windows 4.0" \
  "HP LaserJet 8100:\
  ADOBEPS4.DRV:\
  mopi.PPD:\
  NULL:\
  ADOBEPS4.HLP:\
  PSMON.DLL:\RAW:\
  ADOBEPS4.DRV,mopi.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'\
  TURBO_XP
# This command installs the Win95/98/ME Adobe PostScript driver into the
# Windows XP Professional workstation named "TURBO_XP", when it is run from
# any Samba machine, and if the files had been placed into (UNC-Notation follows)
# "\\turbo_xp\print$\WIN40\" previously (by, for example an appropriate
# smbclient command) or (path specific to my own system follows)
# into "C:\WINDOWS\SYSTEM32\SPOOL\drivers\WIN40\"
--


- 3 --
  rpcclient -U'root%' -c 'adddriver "Windows NT x86" \
  "HP LaserJet 8100:\
  cupsdrvr.dll:\
  mo