A newbie question

Christian Barth barth at cck.uni-kl.de
Wed Dec 6 17:39:54 GMT 2000


OK,
create a print-file sutiable for this printer. Is it a postscript 
printer, then any postscript file will be ok. I will call the file: 
test.ps.

Then, go into a Unix-Shell, type sh to enter the korn-shell,
then type a comand line like:

(echo "print -"; cat test.ps) | /usr/local/bin/smbclient 
\\\\NTMAIN\\prtb2s1 your_password -E -I 89.1.1.23 -N -P -U plr -W 
THRANE

One line!! The \ are repeated because they are special characters to 
the shell. Watch the error messages, read man smbclient. If the above 
works, the problem is not with samba and NT but with Mandrake. In the 
first case tell me the errors, in the later case forget the gui-
configuration, do it manually. Some where in the samba-docs should be 
a discription. Look in what is installed on your system. 
/etc/printcap. There should be some thing like:
smb:\
  lp=/dev/null:\
  sd=/usr/spool/smb:\
  sh:\
  if=/usr/bin/smbprint
with smb as Unix Printer name. Do a "locate smbprint" to see if you 
have a smbprint skript on your system. This skript has a config file, 
propably .config in the spool directory, and creates the above 
comand. But it may be packed into the Mandrake print-filters, ...

By the way,
it's good idea to create a "print-only" user on the NT-Server. The 
password of this user is stored as plain text in the config file, 
which is world readable!! (must be?) So, don't use your account.

Probably only nmbd and not smbd must run for the smbclient comand to 
work. I'm not sure about this. Don't have unnessecary deamons running.

Christian



> I am terribly sorry to ask this supposedly FAQ, but I am enough in
> distress that I don't know where else to ask. If this place turns out to
> the wrong place to ask please tell me where to. I did go through a
> number of emails in the archives, but couldn't pin point one that
> discussed my exact problem.
> 
> Basically I want to print out from a Linux machine recently installed
> with Mandrake 7.2 to an HP4000 printer that sits on an NT4 server. With
> all the configuration tools in Mandrake 7.2 I hoped that the Samba
> configuration would be a breeze. I do however not know anything about
> neither NT4 and its way of printing, nor do I really understand what I
> must look for and do in the Samba configuration.
> 
> Using "smbclient -L 89.1.1.23" I got the following, which I believe is
> the right info (I filtered out everything else):
> 
> Sharename      Type      Comment
> ---------      ----      -------
> prtb2s1        Printer   HP printer
> 
> Server               Comment
> ---------            -------
> NTMAIN               Main NT  SERVER (PDC)
> 
> Workgroup            Master
> ---------            -------
> THRANE               NTMAIN
> 
> So while using 'printerdrake' to configure a printer with Samba (and
> CUPS) I say that:
> 
> Name of printer:  lp
> SMB Server Host:  NTMAIN
> SMB Server IP:    89.1.1.23
> Share Name:       prtb2s1
> User Name:        plr
> Password:         ******       (I use my Windows network password)
> Workgroup:        THRANE
> 
> I select HP Laserjet 4000 from the CUPS menu, which corresponds with the
> actual printer, but when I then select to print out a test page I always
> get:
> 
> lpr: unable to print file: Not Accepting Jobs
> 
> And in a new window the following is displayed:
> 
>    Test page(s) have been sent to the printer daemon.
>    This may take a little time before printer start.
>    Printing status:
>    lp is not ready
> 
> 
>    Does it work properly?
> 
> I have tried fiddling with all the values in many ways, but as I don't
> really understand what is necessary and what is going on I have now
> given up. I have asked our sysadmins, who are solely NT capable and they
> have verified that the information regarding how the printers are
> connected to the NT server is correct. They are otherwise not able to
> help me, and I don't know what good questions to ask them.
> 
> Could someone here please enlighten me?
> 
> Thank you very much,
> 
> Peter
> 
> 
> 
> 


_______________________________________________________________________
In a world without walls and fences, who needs windows and gates? (SUN)




More information about the samba-ntdom mailing list