Date: Tue, 18 Jun 1996 12:08:46 +0200 (MET DST) From: "Christoph P. Kukulies" <kuku@gilberto.physik.rwth-aachen.de> To: terry@lambert.org (Terry Lambert) Cc: kuku@gilberto.physik.rwth-aachen.de, freebsd-questions@freefall.freebsd.org Subject: Re: smbprint (samba -> NT3.51) Message-ID: <199606181008.MAA09419@gilberto.physik.rwth-aachen.de> In-Reply-To: <199606172249.PAA08861@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Anyone gotten printing to NT printers via samba/smbprint working? > > I had just to make the bitter experience that people on our network > > were able doing this from linux while I failed doing it from FreeBSD > > (and I' m fighting for a couple of days now with password/authentication > > problems). Further investigation revealed the following: When I cat a file | ./t (the following little script) everything works like a charm. Doing printing via lpd mechanism (input filter) I get erroneous behaviour. (see second example). 1. example ---------- t: #!/bin/sh ( echo translate echo "print -" cat ) | /usr/local/samba/bin/smbclient \\\\ACC503D\\HP_III -d3 -N -P \ >>/tmp/smbprint-log smbprint-log: 06/18/96 13:45:49 client started (version 1.9.15p8) Opening sockets Connecting to 131.222.51.18 at port 139 Connected max mux 50 max vcs 1 max raw 65536 capabilities 0x3fd Sec mode 12803 max xmt 4356 Got 8 byte crypt key Chose protocol [NT LM 0.12] Server time is Tue Jun 18 11:44:52 1996 Timezone is UTC+2.0 Domain=[E_LAB] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51] Server gave us a UID of 2048. We gave 0 Connected with cnum=2048 max_xmit=4356 smb: \> CR/LF<->LF and print text translation now on smb: \> dos_clean_name [stdin] printing file - as stdin 148 bytes printed 2. example ---------- printcap excerpt: smblp|PostScript|ps:\ :mx#0:\ :lp=/dev/null:\ :cm=Ghostscript to laser on druckserver:\ :sd=/var/spool/lp/druckserver:\ :af=/var/spool/lp/druckserver/acct:\ :lf=/var/log/lpd-errs:\ :sh:\ :if=/usr/local/samba/bin/smbprint-ps: smbprint-ps: #!/bin/sh # # psif - Print PostScript or plain text on a PostScript printer # Script version; NOT the version that comes with lprps # Installed in /usr/local/libexec/psif # #DRUCKSERVER=druckserver DRUCKSERVER=ACC503D read first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then # # PostScript job, print it. # ( echo $first_line ; cat ) | \ /usr/local/bin/gs -sDEVICE=ljet3 -sOutputFile=- -q - | \ /usr/local/samba/bin/smbprint $DRUCKSERVER HP_III blues else # # Plain text, convert it, then print it. # ( echo $first_line; cat ) | /usr/local/bin/textps | \ /usr/local/bin/gs -sDEVICE=ljet3 -sOutputFile=- -q - | \ /usr/local/samba/bin/smbprint $DRUCKSERVER HP_III blues fi exit 0 smbprint: #!/bin/sh # logfile=/tmp/smb-print.log server=$1 service=$2 job=$3 echo "server $server, service $service, job $job" >> $logfile ( # echo translate echo "print -" cat ) | /usr/local/samba/bin/smbclient \\\\ACC503D\\HP_III -d3 -N -P >>$logfile smb-print.log: 06/18/96 13:29:41 client started (version 1.9.15p8) Opening sockets Connecting to 137.226.31.98 at port 139 Connected max mux 50 max vcs 1 max raw 65536 capabilities 0x3fd Sec mode 12803 max xmt 4356 Got 8 byte crypt key Chose protocol [NT LM 0.12] Server time is Tue Jun 18 11:28:45 1996 Timezone is UTC+2.0 Domain=[E_LAB] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51] Server gave us a UID of 2048. We gave 1 SMBtconX failed. ERRDOS - ERRnoaccess (Access denied.) Perhaps you are using the wrong sharename, username or password? Some servers insist that these be in uppercase server ACC503D, service HP_III, job 06/18/96 13:31:56 client started (version 1.9.15p8) Opening sockets Connecting to 131.222.51.18 at port 139 Connected max mux 50 max vcs 1 max raw 65536 capabilities 0x3fd Sec mode 12803 max xmt 4356 Got 8 byte crypt key Chose protocol [NT LM 0.12] Server time is Tue Jun 18 11:31:00 1996 Timezone is UTC+2.0 Domain=[E_LAB] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51] Server gave us a UID of 2048. We gave 1 SMBtconX failed. ERRDOS - ERRnoaccess (Access denied.) Perhaps you are using the wrong sharename, username or password? Some servers insist that these be in uppercase Maybe I did something very wrong with the shell scripts but I don't see the error at the moment. Also the user id (We gave 0 resp. 1) - in the first case I was root in the second case it's daemon or bin (1) - doesn't seemm to be the problem. Also strangely when I left office yesterday I thought it worked with the cut down script smbprint - this morning I wanted to try again and it fails again. > > I believe you *must* go to NT password based authentication. > > There's code for passing the NT-algorithm encrypted password > over the wire. We had to enable it for the NT clients to be > able to use the Samba shares (the principle is the same, though, > going from BSD to the NT server). > > Are you running the right protocol level? I don't think it > uses the right one in BSD, by default (ie: it's right for Win95, > but not for NT). > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. --Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606181008.MAA09419>