The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Anyone mix Samba w/ HP Jetdirect?
Author: Mark Ma 
Date:   25-01-01 21:23

I am trying to get my Samba server to print remotely to an HP print server (JetDirect). I have tweeked printcap, smb.conf, and other things. But, I know I am guessing at best.

If anyone has mastered this procedure, I would be very thankful for some tips on configuration of the printer devices in printcap, the spool directory setup with rights needed, and smb.conf setup. I am using FBSD 4.0R, Samba 2.0.6, and HP JetDirect card in a HP Laser.

Reply To This Message
 
 Re: Anyone mix Samba w/ HP Jetdirect?
Author: Kevin Gable 
Date:   27-01-01 06:51

Avoid Samba altogether as a print server.

If you set up the remote printer correctly under /etc/printcap, you essentially turn the BSD box into a print server for the JetDirect card. Access control is handled through /etc/hosts.lpd.

My (sanitized) printcap entry:

lj4000|LaserJet 4000N:\
:sh:\
:rm=<ipaddress>:sd=/var/spool/output/lj4000:lf=/var/log/lpd-errs:\
:lp=/dev/null:rp=raw:

allows me to set up a Windows box to send print jobs to the HP via the BSD box. <ipaddress> is the ip of the JetDirect card.

It's probably easy enough to bypass the BSD box completely, but I'm not enough of a Windows weenie to tell you how, and this works for me.

Reply To This Message
 
 Re: Anyone mix Samba w/ HP Jetdirect?
Author: Mark 
Date:   29-01-01 21:35

If I understand correctly, your method requires an entry under /etc/hosts.lpd for each machine I want to print from. If I have not setup a user under Samba, will it still work if I simply enter their computer network name/IP addresses into hosts.lpd?

Are there any rights that need to be assigned to the /var/spool/output directory? I apologize for not knowing more, but how does your lj4000 know to pick up it's files stored at /var/spool/output/lj4000? Is this accomplished through the configuration of JetDirect?

As for the Win box, how does it see the queue? With Samba, I see a printer folder under the Samba drive. How do you get to the print queue without Samba?

Much thanks for this help. I will be very glad if this works.

Oh, and by the way, have you ever tried any of the alternatives to LPD like LPRng? Just curious if the other option is worth the effort to learn about.

Reply To This Message
 
 Re: Anyone mix Samba w/ HP Jetdirect?
Author: Kevin Gable 
Date:   02-02-01 07:10

Point by point:
1. Yes, hosts.lpd will have an entry for each machine you want to allow to use the BSD box as a print server. I think you can define access by subnet, but have not experimented with syntax. My guess is that it's similar to that for hosts.allow under tcpwrappers.

2. The JetDirect card is configured to accept jobs via ethernet; nothing special is done beyond that. (As I may have said, the Windows boxes may be able to access the JetDirect card without use of a file server; I have never done it that way. The BSD server provides a fairly sane queuing mechanism). The LaserJet is not actively getting files from the spool; the BSD lpd is picking them up and sending them, and the LJ takes whatever comes to it. My /var/spool/output/lj4000 directory is mod 0755, owner daemon, group daemon. I'm sure there are security considerations here, but this works for me.

3. I'd have to look at the Windows configuration to know for sure (email me if you get desperate; I'm at home now and the boxes are at work), but I believe you specify the BSD box as the server and the printer name (in this case, lj4000), and there may be a selection to specify that it's a BSD-style print queue. On the latter I may be confusing Windows with SGI. I do know it's done via "Add Printer", and through some sort of "Network Printer" tab or dialog.

4. I use LPRng on my SGI because I want BSD-style queuing, but find no use for any of its features under BSD. If you try it, make sure you get the latest version; there was an exploit published a few months back that has since been plugged.

Good luck.

Reply To This Message
 
 Re: Anyone mix Samba w/ HP Jetdirect?
Author: Mark 
Date:   02-02-01 18:17

Gread response! Thanks much for the many details. Will go try it all out!

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org