Bug 7641 - cupsaddsmb loops endlessly and throws WERR_INVALID_PARAM
cupsaddsmb loops endlessly and throws WERR_INVALID_PARAM
Status: NEW
Product: Samba 3.5
Classification: Unclassified
Component: Printing
3.5.4
x86 Linux
: P3 normal
: ---
Assigned To: Guenther Deschner
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-23 04:52 UTC by Domen Kožar
Modified: 2011-10-11 22:25 UTC (History)
2 users (show)

See Also:


Attachments
output.txt (185.73 KB, text/plain)
2010-08-23 04:57 UTC, Domen Kožar
no flags Details
smb.conf (19.47 KB, text/plain)
2010-08-25 07:20 UTC, Domen Kožar
no flags Details
cupsaddsmb.out (139.45 KB, text/plain)
2010-08-27 05:16 UTC, Domen Kožar
no flags Details
/var/log/samba/log.smbd (115.59 KB, text/plain)
2010-08-27 05:17 UTC, Domen Kožar
no flags Details
/var/log/samba/log.127.0.0.1 (327.14 KB, text/plain)
2010-08-27 05:17 UTC, Domen Kožar
no flags Details
patch for addprinterdriver server call (1.43 KB, patch)
2010-11-30 04:29 UTC, Guenther Deschner
asn: review+
Details
/var/log/samba/log.smbd (175.60 KB, text/plain)
2010-12-01 15:59 UTC, Domen Kožar
no flags Details
/var/log/samba/log.127.0.0.1 (199.07 KB, text/plain)
2011-01-05 15:42 UTC, Domen Kožar
no flags Details
out.log (322.18 KB, text/plain)
2011-01-15 11:37 UTC, Domen Kožar
no flags Details
samba log (211.17 KB, text/plain)
2011-05-08 20:09 UTC, Domen Kožar
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Domen Kožar 2010-08-23 04:52:12 UTC
cupsaddsmb -H localhost -h localhost -U samba -v HP4L

Seems like driver won't install for Windows 4.0, see the attached logs.
Comment 1 Domen Kožar 2010-08-23 04:57:02 UTC
Created attachment 5915 [details]
output.txt

command output
Comment 2 Guenther Deschner 2010-08-24 03:11:25 UTC
Have you checked you use correct credentials ?

Please see if 
smbclient //localhost/print$ -U samba

succeeds first.
Comment 3 Domen Kožar 2010-08-24 03:21:05 UTC
Yes, I get into the smb console issuing that command.
Comment 4 Guenther Deschner 2010-08-25 06:27:45 UTC
Hm, weird. I tried myself and could not reproduce. Can you please give more information ? What exact package version, what kind of domain setup, smb.conf, etc.
Comment 5 Domen Kožar 2010-08-25 06:47:24 UTC
3.5.4 from Gentoo main tree. installed flags:

acl client cups ldap netapi pam readline server smbclient syslog

Attaching smb.conf, anything else relevant? cups version: 1.3.11
Comment 6 Domen Kožar 2010-08-25 07:20:36 UTC
Created attachment 5924 [details]
smb.conf

smb.conf
Comment 7 Guenther Deschner 2010-08-25 15:39:44 UTC
Ok, I can reproduce a failure with your config, though probably not the one you are seeing (NT_STATUS_LOGON_FAILURE - which is a clear pointer to a user password mismatch or a non existing unix/smbuser).

The failure I see in my reproducer is a a misconfiguration.

You force everything to happen under samba, and grant root privileges only in the print$ share, that way the openprinterex with strong access rights fails.

If I add for example "printer admin = root, samba" to the global section, it works.
Comment 8 Domen Kožar 2010-08-25 19:11:20 UTC
Here is what I did:

* added "printer admin = root, samba" to smb.conf
* restarted samba
* ran command as samba and as root, same error

It seems like driver successfully install for different windows versions, but not for "Windows 4.0", that's why I would guess it's not a permission problem.
Comment 9 Guenther Deschner 2010-08-27 04:03:30 UTC
(In reply to comment #8)
> Here is what I did:
> 
> * added "printer admin = root, samba" to smb.conf
> * restarted samba
> * ran command as samba and as root, same error
> 
> It seems like driver successfully install for different windows versions, but
> not for "Windows 4.0", that's why I would guess it's not a permission problem.

Here cupsaddsmb tries to find the i386 drivers in /usr/share/cups/drivers. Do you have all the drivers you need in that directory ?

Comment 10 Domen Kožar 2010-08-27 04:12:54 UTC
lipus drivers # pwd
/usr/share/cups/drivers
lipus drivers # ls -a
ADFONTS.MFM   ADOBEPS4.HLP  cups6.ini    cupsui6.dll  ps5ui.dll     pscript.hlp  PSMON.DLL
ADOBEPS4.DRV  cups6.inf     cupsps6.dll  ICONLIB.DLL  pscript5.dll  pscript.ntf
Comment 11 Guenther Deschner 2010-08-27 04:46:11 UTC
Hm, I don't use the Adobe drivers but the MS drivers for postscript but that shouldnt make a difference here, I guess.

Only high debugging levels might help from here:

please add "log level = 10" and "max log size = 0" temporarily to your smb.conf and upload the client and server logging output.

Thanks
Comment 12 Domen Kožar 2010-08-27 05:16:39 UTC
Created attachment 5932 [details]
cupsaddsmb.out

cupsaddsmb.out
Comment 13 Domen Kožar 2010-08-27 05:17:15 UTC
Created attachment 5933 [details]
/var/log/samba/log.smbd

smbd.log
Comment 14 Domen Kožar 2010-08-27 05:17:55 UTC
Created attachment 5934 [details]
/var/log/samba/log.127.0.0.1

log.127.0.0.1
Comment 15 Guenther Deschner 2010-08-27 05:31:00 UTC
ok, I see. config file is NULL in the addprinterdriver operation, this is something we don't permit on the server-side. I need to check what the correct solution for this is.
Comment 16 Domen Kožar 2010-08-31 10:35:58 UTC
Is there anything I can do on my side?
Comment 17 Guenther Deschner 2010-09-01 05:17:01 UTC
No, I see the problem, expect to have a fix soon.
Comment 18 Domen Kožar 2010-10-01 18:06:51 UTC
Ping, don't want to be rude, just looking for status :)
Comment 19 Guenther Deschner 2010-11-30 04:29:47 UTC
Created attachment 6094 [details]
patch for addprinterdriver server call

Can you please verify this patch ?
Comment 20 Domen Kožar 2010-11-30 17:10:20 UTC
Hey, thanks for the patch. Unfortunately it's not working, still looping endlessly. Do you want another verbose output? Here is a snippet:


Running command: rpcclient localhost -N -A /tmp/4cf583df6acac -c 'setdriver HP4L HP4L'
Connecting to host=localhost
Connecting to 127.0.0.1 at port 445
Doing spnego session setup (blob length=58)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=NONE
Got challenge flags:
Got NTLMSSP neg_flags=0x608a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
result was WERR_INVALID_PARAM
Comment 21 Guenther Deschner 2010-11-30 17:35:38 UTC
Hm, are you sure you have restarted smbd after you patched the sourcecode ? If not, then please upload the samba logfiles and maybe also a network trace.
Comment 22 Guenther Deschner 2010-11-30 18:32:33 UTC
Are you applying this patch on top of the v3-5-test tree ? Just tested that and it worked just fine now.
Comment 23 Domen Kožar 2010-12-01 05:36:18 UTC
I am applying against  3.5.6, I will paste the logs soon!
Comment 24 Domen Kožar 2010-12-01 15:59:44 UTC
Created attachment 6097 [details]
/var/log/samba/log.smbd

smbd log file
Comment 25 Domen Kožar 2010-12-05 15:52:36 UTC
Any additional info needed? Here is what I did:

* recompiled samba 3.5.6 with the patch
* restarted samba services
* ran cupsaddsmb

Still same result
Comment 26 Guenther Deschner 2010-12-06 10:27:27 UTC
Hm, that new logfile does not show a single attempt to anything printing related, maybe we need to have the log.127.0.0.1 logfile. Can you please upload that instead ?
Comment 27 Guenther Deschner 2011-01-04 04:09:43 UTC
any news ?
Comment 28 Domen Kožar 2011-01-05 15:42:53 UTC
Created attachment 6181 [details]
/var/log/samba/log.127.0.0.1

Client log
Comment 29 Guenther Deschner 2011-01-14 10:42:31 UTC
(In reply to comment #28)
> Created an attachment (id=6181) [details]
> /var/log/samba/log.127.0.0.1
> 
> Client log
> 

Thanks, but again: absolutely nothing printing related in that logfile. Can you give the exact command line you where using ? and also the output of "find /usr/share/cups/drivers" would be helpful.
Comment 30 Guenther Deschner 2011-01-14 10:43:50 UTC
Karolin, can you please add the patch to 3.5 ? It is definitely correct what the patch does.
Comment 31 Guenther Deschner 2011-01-14 10:44:58 UTC
spoke too soon, we need the review first...
Comment 32 Andreas Schneider 2011-01-14 10:51:27 UTC
Comment on attachment 6094 [details]
patch for addprinterdriver server call

Looks fine for me!
Comment 33 Guenther Deschner 2011-01-14 11:21:19 UTC
ok, this time :)
Comment 34 Domen Kožar 2011-01-14 12:55:18 UTC
/usr/share/cups/drivers/
/usr/share/cups/drivers/cupsui6.dll
/usr/share/cups/drivers/ADOBEPS4.DRV
/usr/share/cups/drivers/ADOBEPS4.HLP
/usr/share/cups/drivers/ps5ui.dll
/usr/share/cups/drivers/cups6.inf
/usr/share/cups/drivers/cups6.ini
/usr/share/cups/drivers/pscript.hlp
/usr/share/cups/drivers/pscript.ntf
/usr/share/cups/drivers/PSMON.DLL
/usr/share/cups/drivers/cupsps6.dll
/usr/share/cups/drivers/pscript5.dll
/usr/share/cups/drivers/ICONLIB.DLL
/usr/share/cups/drivers/cupsaddsmb.out
/usr/share/cups/drivers/ADFONTS.MFM


Using $ cupsaddsmb -h localhost -H localhost -a -U samba -v
Comment 35 Karolin Seeger 2011-01-15 09:57:57 UTC
(In reply to comment #30)
> Karolin, can you please add the patch to 3.5 ? It is definitely correct what
> the patch does.
> 

Pushed to v3-5-test.
Can we close this bug report now or is it still an issue?
Comment 36 Domen Kožar 2011-01-15 11:32:06 UTC
Bug is still present for me. Attaching cupsaddsmb verbose output.
Comment 37 Domen Kožar 2011-01-15 11:37:32 UTC
Created attachment 6206 [details]
out.log

cupsaddsmb verbose output
Comment 38 Domen Kožar 2011-05-08 17:28:39 UTC
Still an issue in 3.5.8!
Comment 39 Domen Kožar 2011-05-08 19:56:33 UTC
I'm getting WERR_ACCESS_DENIED after adding specific printer section to smb.conf, logs comin up
Comment 40 Domen Kožar 2011-05-08 20:09:33 UTC
Created attachment 6438 [details]
samba log
Comment 41 Benjamin Riggs 2011-10-11 22:25:39 UTC
Setting 'Shared No' for a printer in /etc/cups/printers.conf seems to cause the WERR_INVALID_PARAM.

Samba versions tested: 3.5.6 & .8, though rpm tells me cupsaddsmb, itself, belongs to the cups package, which are version 1.4.2 & .6, respectively.

The version on the box with 3.5.8 & 1.4.6 still gives the WERR_INVALID_PARAM error, but doesn't loop endlessly.