smbclient, SMBwrite vs SMBwriteX

Richard Sharpe rsharpe at
Tue Oct 28 20:38:33 GMT 2003

On Tue, 28 Oct 2003, Chris Dunlop wrote:

> G'day,
> I've been having trouble with a Konica copier/printer returning
> an error when trying to print, e.g.:
>   $ smbclient //konica/print ' ' -c 'print -' < /tmp/
>   Error writing file: ERRSRV - 22
> Examining the network traffic revealed that the printer returns
> the error when smbclient issues an SMBwriteX, and that the
> MS-Windows printer driver (which works of course) was using
> SMBwrite rather than SMBwriteX.
> The patch below implements a '-w' flag for smbclient which makes
> it use SMBwrite rather than SMBwriteX. (The line numbering may
> be a bit off as I'm using the source from debian's
> samba-3.0.0final-1.)
> With this patch I'm able to print to the Konica.
> There looks there may be a smattering of these types of problems
> with other printers as well:
> Possibly these are all using the same buggy (or simply old?)
> underlying SMB implementation in their firmware.

Hmmm, did you look at restricting the protocol level? I am sure that 
WriteX is only supported for certain protocol levels and above.

Another question is, what does the printer tell us it supports?

Richard Sharpe, rsharpe[at], rsharpe[at], 

More information about the samba-technical mailing list