Printer banner always 'nobody'

Eric Warnke eric at
Sat Sep 19 01:27:24 GMT 1998

>I've had this problem as long as I've been using samba: every time
>anyone prints from a PC they get a banner page labeling them 'nobody.'

I use rlpr and a custom banner page, I call a shell script and I pass the
samba info to the script.  I'll show you, you will want to remove the nobody
restriction, as all user are authenticated on my system.  One of the
niceities of doing it yourseld is I also have both the IP address, and the
NetBios computer name on the banner page as well.

rlpr can be found somewhere on the internet.  It's just a user level program
to do lpr, without /etc/printcap.

Eric Warnke


   comment = Indian Quad Office - Lexmark OptraLXN+
   printer = queind1
   path = /tmp
   public = no
   printable = yes
   writable = no
   browsable = yes
   invalid users = nobody seneca tuscaror
   printer driver = Lexmark Optra PS
   postscript= no
   print command = /export/home/samba/bin/ %U %s indian1 %M OptraLXN+ Indian#1

and here is the

miranda% [root] more
#! /usr/local/bin/perl

open(RLPR,"|/export/home/samba/bin/rlpr -Q$ARGV[0]\.$ARGV[3]\.$ARGV[4]\@$ARG
V[2]")||die("Rlpr > /dev/null");
open(BANNER, "/opt/lexmark/markvision/etc/banners/banner_ps $ARGV[3]
$ARGV[0] $ARGV[4] $ARGV[5] $ARGV[6]|")||die("Banner?");
open(DATA,"$ARGV[1]")||die("Bad input file");
while( $line = <BANNER> ) {
    print RLPR ($line);
print RLPR ("\cD");
while( $line = <DATA> ) {
    print RLPR ($line);
`rm $ARGV[1] > /dev/null`

banner_ps is a shell script that generates a lexmark banner page with the
appropriate subtitutions.

More information about the samba mailing list