Problem Remote Printing with smbclient and NT

Marc Lepage mlepage at cgowave-16-35.cgocable.net
Tue Apr 13 23:38:43 GMT 1999


I'm having a difficult time setting up printing from a remote client to
a Linux server. Please email replies to
mlepage at cgowave-16-35.cgocable.net as I am having difficulty subscribing
to the mailing list.


The print server is a Debian 2.1 Linux system with an HP LaserJet 5000
connected via parallel port. It prints correctly using lpr, even as user
nobody. Also, remote Linux machines can print to the server using lpr.
The /etc/printcap is below.

# cat /etc/printcap
hplj5000|lp
	:lp=/dev/lp1
	:sd=/var/spool/lpd/hplj5000
	:af=/var/log/lp-acct
	:lf=/var/log/lp-errs
	:rw
	:sh


The print server has SAMBA installed using inetd. The /etc/smb.conf is
below.

# cat /etc/smb.conf
[global]
   printing = bsd
   printcap name = /etc/printcap
   load printers = yes
   guest account = nobody
   invalid users = root
;   security = user
   workgroup = WORKGROUP
   server string = %h server (Samba %v)
   socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096
SO_RCVBUF=4096
   encrypt passwords = yes
   wins support = no
   name resolve order = lmhosts host wins bcast
   dns proxy = no
   preserve case = yes
   short preserve case = yes
   unix password sync = false
   max log size = 1000
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/lpd/lp
   printable = yes
   public = yes
   writable = no
   create mode = 0700


>From another Linux machine, I can list shares on the print server using
"smbclient -L 192.168.0.7":

	Sharename      	Type      	Comment
	---------      	----      	-------
	hplj5000       	Printer   	lp


So the printer shows up. But I cannot print a test.txt file using
smbclient:

$ cat test.txt
This is a test.
$ smbclient '\\192.168.0.7\hplj5000' -P
No interface found for address xx.xx.xx.xx
Added interface ip=xx.xx.xx.xx bcast=24.255.255.255 nmask=255.0.0.0
Server time is Tue Apr 13 19:29:30 1999
Timezone is UTC-4.0
Password: 
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 1.9.18p10]
security=share
smb: \> print test.txt
ERRDOS - ERRnoaccess (Access denied.) opening printer for test.txt
smb: \> quit


Examining /var/log/smb (at debug level 10) reveals difficulty with the
file:

switch message SMBsplopen (pid 168)
become_user uid=(0,65534) gid=(65534,65534)
chdir to /var/spool/lpd/lp
is_in_path: test.txt.a00168
is_in_path: no name list.
unix_clean_name [test.txt.a00168]
calling open_file with flags=0x1 flags2=0x240 mode=0600
Allocated new file_fd_struct 0, dev = ffffffff, inode = ffffffff
Error opening file test.txt.a00168 (Permission denied) (flags=65)
fd_attempt_close on file_fd_struct 0, fd = -1, dev = ffffffff, inode =
ffffffff, open_flags = 1, ref_count = 1.
1999/04/13 19:29:51 error packet at line 2673 cmd=192 (SMBsplopen)
eclass=1 ecode=5
error string = Permission denied


So, it seems I cannot print from smbclient, although I can browse file
shares (eg, tmp). Also, I cannot print from NT4SP4, although I can
browse file shares. I know there are problems with security, encrypted
passwords, etc., but since this is all behind a firewall I'd just like
to get remote printing via SAMBA working.

I'm sure I'm missing something simple, but it isn't obvious to me and
I've spent a day trying to get it to work. Any ideas would be
appreciated.


More information about the samba mailing list