[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lpr in chroot environment



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 28 Aug 2002, Fernando Braga wrote:

> I've implemented a chroot environment on OPENBSD_3.0 for some users. I
> need that some users be able to use lpr. Every time lpr is used, lpd
> crashes.
>
> I can understand that chroot users cannot use the lpr socket to
> communicate with outside lpd, but could not understand the lpd crash.
>
> Every time someone try to print, I need to issue lpc restart command.

According to our last phone conversation, have you tryed creating your
printer device inside the chroot jail? Assuming 'epson' is you printer
name and you chroot dir is '/chroot':

- --
$ sudo mkdir -p /chroot/var/spool/lpd/epson (put here files,etc)
$ sudo ln -s /chroot/var/spool/lpd/epson /var/spool/lpd/epson
- --

So then, you have the hability to print from inside or outside the chroot.
To make the chroot jail have access to you printer, simply ask lpr to use
a epson_(_at_)_127_(_dot_)_0_(_dot_)_0_(_dot_)_1 as a remote printer. Just remind to allow network
traffic to your lpd port_(_at_)_localhost_(_dot_)_ You should have 2 printcap files: one
to the main system using '/chroot/var/spool..' as the printer directory
and another at the chroot enviroment pointing the printer to '/var/spool...'.



Best Regards,

- -- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Eduardo A. Alvarenga - Analista de Suporte #179653
 Secretaria de Segurança  Pública do Estado do Pará
      Belém - Pará - (91) 223-4996 / 272-1611
     eduardo_(_at_)_{thrx_(_dot_)_dyndns_(_dot_)_org,segup.pa.gov.br}
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  OpenBSD Consultant: www.openbsd.org/support.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9dnEopKK2uJoGDlMRArORAKCDKlssIX3DR3l80YHr8x4simcYawCgxrFX
tFN8B+bJf+wfXA9QGL5V8sg=
=TXDo
-----END PGP SIGNATURE-----



Visit your host, monkey.org