Skip to Content.
Sympa Menu

baslinux - Re: [BL] printing as root with lpr

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] printing as root with lpr
  • Date: Sat, 17 Dec 2005 02:28:56 +0000 (UTC)

On Fri, 16 Dec 2005, David Moberg wrote:

On 12/16/05, sindi keesan <keesan AT sdf.lonestar.org> wrote:
I cannot print as root with lpr:
ls -l lpr
-r-s--s--x

Does this mean I can print as superuser?

This should mean that anyone can run this as root.

Who owns lpr? What group owns lpr? (i.e. send the rest
of ls -l)

ls -l /usr/bin/lpr
-r-s--s--x 1 root lp 15096 May 13 2000 lpr
(from Slackware 7.1 lpr.tgz)

I can print a file with lpr filename if I first, as root,
chmod +r filename, insmod lp, lpr, then login as user.

lpr filename.

If I try to do this as root, I get another prompt and nothing prints.

How do I print as root with lpr?

Please remind us of what error message you get when
you try to execute lpr.

In Pine, after using kermit to ssh to my bbs. Pine 4.63. An earlier version did not work either. (I presume this version still works in DOS).
Print Message 11 using "attached-to-ansi"?
Something flashes by too fast to read, in inverse print.
The last few letters in it are 'ched desktop printer...]
At sdf, I think it said it could not execute this command.
How do I make it pause so I can read it?

I have tried this as root and user (on my computer - at the bbs I am a user). At two shell accounts.

Pine is set, in config, printer, to:
Printer attached to IBM PC or compatible, Macintosh.
Printer: attached-to-ansi

This setup 'is known to work with Kermit' (it does in DOS, not in linux yet) and a few other programs.

There is a following section:
Standard UNIX print command
Using this option may require setting your "PRINTER" or "LPDEST" environment variable using the standard UNIX utilities.
Printer List: "" lpr

Do I need to edit /etc/profile to set this variable?
I tried both
export PRINTER=/dev/lp0
and
export PRINTER=lpr - it took longer not to work this way.

I tried (at my end)
set PRINTER lpr

Pine has another section where you can choose some other printer than lpr.


Is there any reason not to chmod +x lpr so I can print as root with lpr
(from xpdf, xv, Opera...).

It is already chmodded +x. Try chmodding +x. Then do ls -l. It should
be exactly the same as before.
You are right.

So why can't I
lpr filename
as root, only as user?


I know I am supposed to go online as user but kermit does not have the
permissions to dial (/var/lock is -rw-r--r--).

chmod a+w /var/lock

Gives everyone write permission to /var/lock.
Why is /var/lock not permitted by default? ttyp0?

Will setting /var/lock this way make it easier for vandals to access my computer when I dial in?

I can dial as root and then telnet as user, not ssh (ttyp0 permissions).

I don't mind going online as root if I can print as root (with lpr) and I really would like to print my emails directly from the shell account.




David




Archive powered by MHonArc 2.6.24.

Top of Page