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.' Now, I realize this has to do with the guest account being 'nobody,' and the server is passing that name to the printer. It can get very frustrating, though, when lots of folks use the same printer and all of the jobs have the same name on them. So I guess my question would be, is there a way to print using the username instead of the guest account? I'm using v1.9.16p9 on a Solaris 2.4 machine printing to HP Laserjet 4m+.
>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 smb.conf [indian1] 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/print_script.pl %U %s 169.226.224.125 indian1 %M OptraLXN+ Indian#1 and here is the print_script.pl miranda% [root] more print_script.pl #! /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.
I just add the following line in the definition of the share printer in the smb.conf file force user = %U -C. Dumont
> Date: Fri, 18 Sep 1998 16:18:43 -0700 > From: Michael Page <michael.page@exemplar.com> > To: samba@samba.anu.edu.au > Subject: Printer banner always 'nobody' > Message-ID: <3602EA53.A11993E3@exemplar.com> > > 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.' > > Now, I realize this has to do with the guest account being > 'nobody,' and > the server is passing that name to the printer. It can get very > frustrating, though, when lots of folks use the same printer > and all of > the jobs have the same name on them. > > So I guess my question would be, is there a way to print using the > username instead of the guest account? > > I'm using v1.9.16p9 on a Solaris 2.4 machine printing to HP Laserjet > 4m+. >Why not simply turn the banner page off? If you are using network printing on the HP, then the JetDirect card has the ability to print a banner page also. To turn it off there you will need to telnet into the printer and type >banner: 0 to turn the banner page off. The other option is to give _everyone_ an account on your unix box (even if you give them a null shell so that they cant log in) so that their names appear correctly on the banner page. Regards, Darren Smith Unix Administrator CUDiv - Olympic Dam ext. 87242
i guess you have sambe on unix... I nerver did it, but the lpr command has option -U which permit you to pass another user name for the burst page... Why not gat the username with %u and have the print command like lpr -P.... -U %u .... you may have to modify /etc/printcap so the user name translation can be done for a process run by nobody (normaly it is only permitted for daemon process) you should read a little the man pages for lpr and printcap :o))) hope this help =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Michel APPLAINCOURT | E-mail : michel.applaincourt@umh.ac.be Computer Sciences Assistant | Phone : 32 65 373498 Universite de Mons-Hainaut | Fax : 32 65 373318 [Sad...But True] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-