Bug 959 - rpcclient adddriver works, but setdriver fails
rpcclient adddriver works, but setdriver fails
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools
3.0.0
All Linux
: P3 normal
: none
Assigned To: Tim Potter
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-12 07:56 UTC by Ferdinand Hagethorn
Modified: 2005-08-24 10:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ferdinand Hagethorn 2004-01-12 07:56:43 UTC
A description of my configuration:

Samba v3.0.0 - deb format from the samba.org site 
(also tried 3.0.1 but that broke the ADS connection so i had to downgrade back
to 3.0.0 again)
Server = ADS
printer admin = Administrator, @"Domain Admins"

What i want to do: using the cupsaddsmb command i want to add the cups driver to
the printer NL_COMPANY_ICT using the Administrator account from the Win2k
domaincontroller.. this is what happens:

fpserv:~# cupsaddsmb -v -H localhost -U Administrator NL_COMPANY_ICT
Password for Administrator required to access localhost via SAMBA: 
running command: smbclient //localhost/print\$ -N -U'Administrator%xxxxxx' 
 -c 'mkdir W32X86;put /var/spool/cups/tmp/4002bd7782a81 
 W32X86/NL_COMPANY_ICT.ppd;put /usr/share/cups/drivers/cupsdrvr5.dll 
 W32X86/cupsdrv5.dll;put /usr/share/cups/drivers/cupsui5.dll 
 W32X86/cupsui5.dll;put /usr/share/cups/drivers/cups5.hlp 
 W32X86/cups5.hlp'
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86

Running command: rpcclient localhost -N -U'Administrator%xxxxxx' 
 -c 'adddriver "Windows NT x86" "NL_COMPANY_ICT:cupsdrv5.dll:\
 NL_COMPANY_ICT.ppd:cupsui5.dll:cups5.hlp:NULL:RAW:NULL"'
Printer Driver NL_COMPANY_ICT successfully installed.

Running command: rpcclient localhost -N -U'Administrator%xxxxxx' 
 -c 'setdriver NL_COMPANY_ICT NL_COMPANY_ICT'
SetPrinter call failed!
result was WERR_ACCESS_DENIED


Weird: adddriver works, but setdriver doesnt?!

Checking whats installed:
fpserver:~# rpcclient -k -H localhost    # yes this works :)
rpcclient $> enumprinters
        flags:[0x800000]
        name:[\\fileserver\NL_COMPANY_ICT]
        description:[\\fileserver\NL_COMPANY_ICT,,HP4100 ICT Department]
        comment:[HP4100 ICT Department]

rpcclient $> enumdrivers

[Windows NT x86]
Printer Driver Info 1:
        Driver Name: [NL_COMPANY_ICT]


[Windows NT x86]
Printer Driver Info 1:
        Driver Name: [NL_COMPANY_ICT]

// trying the setdriver command by hand...
rpcclient $>setDriver NL_COMPANY_ICT NL_COMPANY_ICT
SetPrinter call failed!
result was WERR_ACCESS_DENIED

---- output of command with debuglevel 5: (only interesting parts)
<SNIPP>
000018 spoolss_io_r_getprinter 
        0018 ptr: 00000000
    001c needed: 000001d8
    0020 status: WERR_INSUFFICIENT_BUFFER
// this is weird...
<SNIPP>
000018 spoolss_io_r_setprinter 
    0018 status: WERR_ACCESS_DENIED
SetPrinter call failed!
// access denied? on what? cups? - read on
<SNIPP>

I can't do this as root, because root isnt know on the Win2k AD and this is a
ADS configuration. Maybe printer admin = doesnt run this call as root (which it
should?)
Comment 1 Guenther Deschner 2004-11-24 17:08:46 UTC
Tim, Ferdinand, this was most probably a configuration error and is known to
work for a long time since 3.0.0. Closing this bug now. 
Comment 2 Gerald (Jerry) Carter 2005-08-24 10:16:41 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.