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

RE: [K12OSN] Printing to spesfic printers only



On Wed, 2006-10-04 at 21:30 -0400, Steven Santos wrote:
> Ok, so what options exist for automatically adding and removing group
> membership based on IP address?

What it would take is a script that gets run (as root) for each login
that finds the user name in the /etc/cups/cups.conf file, removes it and
puts it in the correct group and then sends a SIGHUP to cups. However, a
SIGHUP has the potential of breaking a print job if it happens at some
critical points. 

> ----------------------------------------------------------------------
> Steven Santos
> Director, Simply Circus, Inc.
> Email: Steven SimplyCircus com
>  Mail: PO BOX 620753
>        Newton, MA 02462
> Phone: 781-799-4938
>  eFax: 309-214-0899
>   Web: www.SimplyCircus.com
> 
> > -----Original Message-----
> > From: k12osn-bounces redhat com [mailto:k12osn-bounces redhat com]On
> > Behalf Of James P. Kinney III
> > Sent: Wednesday, October 04, 2006 11:11 AM
> > To: Support list for open source software in schools.
> > Subject: RE: [K12OSN] Printing to spesfic printers only
> >
> >
> > On Wed, 2006-10-04 at 10:49 -0400, Steven Santos wrote:
> > > Just thinking out loud here, but would it be possible assign a
> > group based
> > > on the IP address, and then use the group to allow / disallow printing?
> > >
> > That's the preferred process. However, the thin client environment has
> > the print job coming from the IP address of the server hosting the boot
> > up and apps, not from the client itself.
> >
> > Printing by user authentication is not an option either as roving
> > students would require restarting cups for each login operation.
> >
> >
> >
> > > ----------------------------------------------------------------------
> > > Steven Santos
> > > Director, Simply Circus, Inc.
> > > Email: Steven SimplyCircus com
> > >  Mail: PO BOX 620753
> > >        Newton, MA 02462
> > > Phone: 781-799-4938
> > >  eFax: 309-214-0899
> > >   Web: www.SimplyCircus.com
> > >
> > > > -----Original Message-----
> > > > From: k12osn-bounces redhat com [mailto:k12osn-bounces redhat com]On
> > > > Behalf Of James P. Kinney III
> > > > Sent: Wednesday, October 04, 2006 10:25 AM
> > > > To: Support list for open source software in schools.
> > > > Subject: Re: [K12OSN] Printing to spesfic printers only
> > > >
> > > >
> > > > On Wed, 2006-10-04 at 06:59 -0600, jconlon1 elp rr com wrote:
> > > > > We have a large server that runs a lab and several 4-6
> > terminal groups
> > > > > in some classrooms.  Some classrooms have one terminal
> > being used as a
> > > > > Jet Direct device.  Is ther a way to set things up so that
> > a classroom
> > > > > group will default to the jet directed printer only?  If
> > there is How do
> > > > > I do it?
> > > >
> > > > Here is what I am gearing up to do along this same line:
> > > >
> > > > Scenario:
> > > > Up to 200 thin clients attached to a single server. Each
> > classroom has a
> > > > networked printer that cups on the server knows about. Students have
> > > > NIS/NFS roving profiles since they move around the school (middle
> > > > school).
> > > > During the login process, a script is run that determines the
> > host name
> > > > (all fixed-IP host name in dhcp.conf) that the student is
> > accessing the
> > > > server from.
> > > > Host names are based on room number and station number:
> > rmXXXwsYY where
> > > > XXX is the room number and YY is the station number in the room.
> > > > Printers are named similarly: rmXXXlaser
> > > >
> > > > At the moment, I am determining the best place to put the script
> > > > (~/.xinitrc , ~/.bashrc , ~/.xsession , ... ) .
> > > >
> > > > Here is the script:
> > > >
> > > > #!/bin/sh
> > > >
> > > > # This script will identify the host name from which a login occurs
> > > > # It will then use that name to set the default printer
> > > > # This requires hostname formatted as rmXXXwsYY and pinters as
> > > > rmXXXlaser
> > > > # XXX is the room number and YY is the station number in the room.
> > > > # the script runs as the user logging in and sets options in
> > > > ~/.lpoptions
> > > >
> > > > export PATH="/bin:/usr/bin"
> > > >
> > > > lpoptions -d `netstat -t -e | grep ESTABLISHED | grep $USER | sed
> > > > 's/:/ /g'| awk '{print $6}' | sort | uniq | cut -f 1 -d "." |
> > sed 's/ws
> > > > \w*/laser/'`
> > > >
> > > > # Place this script in /usr/local/bin/defaultprinter.sh on the server
> > > > with 755 permisions
> > > >
> > > >
> > > > NOTE: the lpoptions line is one line. email will wrap it.
> > > >
> > > > Part 2: Blocking printing to a printer not in the same room with the
> > > > student:
> > > >
> > > > In cups, each printer should allow printing only from a given range of
> > > > IP address. That is done with per printer settings in cupsd.conf.
> > > > HOWEVER, I don't have this part working yet as the print job
> > originates
> > > > on the server and not the client. I am looking pykota/tea4cups as a
> > > > possible way to rewrite the source address on the print job.
> > > > >
> > > > > Thanks in advance
> > > > > Pat
> > > > >
> > > > > _______________________________________________
> > > > > K12OSN mailing list
> > > > > K12OSN redhat com
> > > > > https://www.redhat.com/mailman/listinfo/k12osn
> > > > > For more info see <http://www.k12os.org>
> > > > --
> > > > James P. Kinney III
> > > > CEO & Director of Engineering
> > > > Local Net Solutions,LLC
> > > > 770-493-8244
> > > > http://www.localnetsolutions.com
> > > >
> > > > GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
> > > > <jkinney localnetsolutions com>
> > > > Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
> > > >
> > >
> > > _______________________________________________
> > > K12OSN mailing list
> > > K12OSN redhat com
> > > https://www.redhat.com/mailman/listinfo/k12osn
> > > For more info see <http://www.k12os.org>
> > --
> > James P. Kinney III
> > CEO & Director of Engineering
> > Local Net Solutions,LLC
> > 770-493-8244
> > http://www.localnetsolutions.com
> >
> > GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
> > <jkinney localnetsolutions com>
> > Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
> >
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN redhat com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
-- 
James P. Kinney III          
CEO & Director of Engineering 
Local Net Solutions,LLC        
770-493-8244                    
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney localnetsolutions com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7

Attachment: signature.asc
Description: This is a digitally signed message part


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