Hello,
I am new to lprng, and I am having trouble with the lpd.perms section.
Specifically, the part on restricting some printers to the server only.
Here is a brief summary of my system:
I have primary queues and secondary queues. The primary queues are hold
queues that have a filter which edits the username and inserts stuff into
a database. The secondary queues are NOT hold queues and their filter
just outputs the contents of the control file.
>From a webpage, the client selects his/her print job and either prints the
job to the original queue, to another queue, or deletes the job.
- If the client deletes, issue a 'lprm <primaryqueue> <printjobid>'
command.
- If the client prints the orig. queue, issue a 'lpc release
<primaryqueue> <printjobid>' command.
- Finally, if the client prints to another queue, issue a 'lpc move
<primaryqueue> <printjobid> <secondaryqueue>'.
This is my printcap.local file:
.common:\
:sd=/var/spool/lpd/%P:\
:mx=10240:\
:sh:
# :ifhp=model=hp8550:\
# :filter=/usr/lib/lpfilters/ifhp:\
# :[EMAIL PROTECTED]:
.filter1:\
:force_ipaddr_hostname:\
:incoming_control_filter=/home/billups/iprint/filter/bar1.pl:
.filter2:\
:incoming_control_filter=/home/billups/iprint/filter/bar2.pl:
foo:\
:tc=.common,.filter1:\
:lp=/dev/null:
foo2:\
:tc=.common,.filter2:\
:force_queuename=foo:\
:lp=/dev/null:
If I do not edit the lpd.perms file, everything seems to work. But
clients can print directly to 'foo2'. We do not want this because 'foo2'
is not a hold queue and it doesn't do the necessary editing as 'foo'. So
according to the forum and the HOWTO section, I've edited the lpd.perms
file as follows:
# I think this only accepts all services to 'foo2' if
# one of the ip address matches the server ip
ACCEPT SERVICE=* SERVER PRINTER=foo2
REJECT SERVICE=* PRINTER=foo2
# I initially tried, but it didn't work
#ACCEPT SERVICE=X SERVER PRINTER=foo2
#REJECT SERVICE=X PRINTER=foo2
# Gives www on server special powers
ACCEPT SERVICE=* SERVER REMOTEUSER=www
# EVERTHING BELOW WAS ALREADY IN THE lpd.perms file
# allow root on server to control jobs
ACCEPT SERVICE=C SERVER REMOTEUSER=root
# allow anybody to get server, status, and printcap
ACCEPT SERVICE=C LPC=lpd,status,printcap
# reject all others
REJECT SERVICE=C
# allow same user on originating host to remove a job
ACCEPT SERVICE=M SAMEHOST SAMEUSER
# allow root on server to remove a job
ACCEPT SERVICE=M SERVER REMOTEUSER=root
REJECT SERVICE=M
# all other operations allowed
DEFAULT ACCEPT
The above lpd.perms file almost works, but it seems to break the
':force_queuename=foo:\' line of my printcap.local file. Instead of
having 'Qfoo', I have 'Qfoo2' in the control files. Like I said, I am new
to lprng. Is there something wrong with either the printcap or lpd.perms
file? Sorry for the long email :).
Advanced Thanks,
Kyle Billups
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------