Error ERRaccess in Samba 2.0.7 printing to Netgear print servers
Gary Thorne, Jr.
gary at halsys.com
Tue Jul 11 15:13:08 GMT 2000
I recently compiled and installed Samba 2.0.7 on SCO OpenServer 5.0.4
using gcc v 188.8.131.52 (Skunkware 98). I was running Samba 1.9.18p7 with
no problems. We use a modified smbprint.sysv script to print to
Windows shared printers and also Netgear PS104 print servers. Printing
to the Windows shared printers is working fine, but printing to the
Netgear print servers does not work. I get the following error at the "print -
" statement :
ERRSRV - ERRaccess (The requester does not have the necessary
access rights within the specified context for the requested function. The
context is defined by the TID or the UID.) opening remote file stdin-1234
I compared the 2.0.7 source with the 1.9.18 source and found that the
cmd_print procedure has changed significantly. In clientgen.c, the
cli_open procedure has the following statement :
CVAL(cli->outbuf,smb_com) = SMBopenX
I changed that to
CVAL(cli->outbuf,smb_com) = SMBsplopen;
and the ERRaccess error disappeared.
It is my guess that the Netgear print server does not support the
SMBopenX file SMB commands, but does support the SMBspl print
spool SMB commands. I changed the SMBclose command to
SMBsplclose in cli_close and the SMBwriteX command in
cli_issue_write to SMBsplwr and had a print command that almost
worked except for a write error. Would it be possible to re-enable SMB
spool file printing in Samba 2?
The critical part of the print script is as follows :
# NOTE You may wish to add the line `echo translate' if you want
# CR/LF translation when printing.
echo "print -"
) | /usr/local/samba/bin/smbclient "\\\\$server\\$service" $password -N -P -
U print > /dev/null
I don't think I'm the only one with this problem (see
http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=517185229 ), but I
couldn't find any resolutions. I rolled smbclient back to 1.9.18 for now.
We would like to get this problem fixed, so we can upgrade to the 2.0
release. Thanks in advance for any assistance.
More information about the samba