Problem Remote Printing with smbclient and NT

Marc Lepage mlepage at
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 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

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

# cat /etc/smb.conf
   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)
   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
   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":

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

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

$ cat test.txt
This is a test.
$ smbclient '\\\hplj5000' -P
No interface found for address xx.xx.xx.xx
Added interface ip=xx.xx.xx.xx bcast= nmask=
Server time is Tue Apr 13 19:29:30 1999
Timezone is UTC-4.0
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 1.9.18p10]
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

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

More information about the samba mailing list