[Samba] LPRng: LPRng and Samba (fwd)

Yura Pismerov ypismerov at tucows.com
Sat Nov 16 02:41:01 GMT 2002


In your printer share, define the following:

print command = echo %u@%I: %J %S %T >>  /var/spool/samba/junkJ;\
                a="`echo '%J' | sed "s/^.*- //"`" ;\
                /usr/bin/lpr -P%S  -J"$a"  %s;\
                rm %s

It should log user at IP_of_the_user's_station among other usefuls things
in /var/spool/samba/junkJ file.


Ryan Novosielski wrote:
> 
> I'm looking for a little help with Samba and LPRng, however, the LPRng
> portion of it isn't really all that important -- I believe this is mainly
> a Samba issue.
> 
> The problem here is that we have 4 campus servers. Each one hosts a Samba
> domain. Sometimes, users for whatever reason will go to a different campus
> (where they may or may not have an account -- the problem occurs when they
> do not). They log in using the Samba domain of their home site, but
> attempt to use printers on the campus they are visiting. While the PC they
> are using knows what their username is, and I can take this on good faith,
> since they do not have an account on the machine Samba serving the
> printers, their jobs print as the network guest user. This is clearly a
> problem for accounting. Does anyone know of a way for LPRng to find out
> who the client PC is logged in as by the time accounting occurs? We don't
> wish to just give away pages to students who happen to travel. It's a
> shame the setup is the way it is, but I'm just looking for a way to make
> this work in our current environment.
> 
> Thanks for any help you may wish to give me!
> 
> ---- _  _ _  _ ___  _  _  _
> |Y#| |  | |\/| |  \ |\ |  |  | Ryan Novosielski - Jr. UNIX Systems Admin
> |$&| |__| |  | |__/ | \| _|  | novosirj at umdnj.edu - 973/972.0922 (2-0922)
> \__/ Univ. of Med. and Dent. | IST/ACS - New Jersey Medical School - C630
> 
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba



More information about the samba mailing list