Printer driver parameter deprecated - what now?

Ronan Waide waider at waider.ie
Sun Mar 9 16:07:57 GMT 2003


On March 9, alsbergt at cs.huji.ac.il said:
> > 
> > Uhmm...  I'm not sure.  So what do I do - create the share, create
> > empty directories like 'w32x86' and 'win40' and then issue a setdriver
> > RPC?
> 
> Well, I tried that, does not work, I get:
> 
> SetPrinter call failed!
> result was NT_STATUS_UNSUCCESSFUL

setdriver expects the following setup:
* you are a printer admin, or root.
  - this is the smb.conf printer admin group, not the Printer
    Operators group in NT. I've not tried the latter, but I don't
    believe it will work based on the current code.
* printer admins has to be defined in [global]
* upload the driver files to \\server\print$\w32x86 and win40 as
  appropriate. DON'T put them in the 0 or 2 subdirectories.
* Make sure that the user you're connecting as is able to write to the
  print$ directories
* Use adddriver (with appropriate parameters) to create the driver
  - note, this will not just update samba's notion of drivers, it will
    also move the files from the w32x86 and win40 directories to an
    appropriate subdirectory (based on driver version, I think, but
    not important enough for me to find out)
* Use setdriver to associate the driver with a printer

The setdriver call will fail if the printer doesn't already exist in
samba's view of the world. Either create the printer in cups and
restart samba, or create an add printer command (see smb.conf doco)
and use RPC calls to create a printer. NB the add printer command MUST
return a single line of text indicating which port the printer was
added on. If it doesn't, Samba won't reload the printer
definitions. Although samba doesn't really support the notion of
ports, suitable add printer command and enumport command settings can
allow you pretty good remote control of the samba printer setup.

Hope this helps you somewhat.

Cheers,
Waider.
-- 
waider at waider.ie / Yes, it /is/ very personal of me.

"Junk food is considered part of the vegetable food group, because it comes
 from a plant. A big chemical plant. In New Jersey." - Kludge Dorsey


More information about the samba-technical mailing list