Solved

choosing who can print

Posted on 1998-11-10
7
192 Views
Last Modified: 2013-12-15
Hello

How do I choose which users will be able to print and which won't on a specific printer?
0
Comment
Question by:pablocosta
  • 3
  • 2
  • 2
7 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 1631591
echo 'spgrp:*:9999:user1,user2,user3,etc.' >> /etc/group
mkdir /var/spool/lpd/specific_printer
chgrp spgrp /var/spool/specific_printer
chmod 770 /var/spool/specific_printer

0
 
LVL 1

Author Comment

by:pablocosta
ID: 1631592
Thank you ahoffmann for your answer.
Please excuse me for the delay :)
I tried what you suggest here and it did not work.
As I was really in a hurry I removed the lp* packages and reinstalled them again.
It still did not work, so I gave permission to everybody to do whatever they wanted on the spool dirs and now it works fine.
I already tried that before reinstall but it did not work.
I am trying your suggestion again because I don't want to keep the printer available to everybody. Please be patient as I am very busy and I have to do that on my spare time.
THANKS.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1631593
probably the user    lp    must also be in this group
and/or own the directories
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 1

Expert Comment

by:iNFaMouS
ID: 1631594
i see you already got an answer =)
i suggest as you are using a CGI for printing, just set the right for this particular executable to be executed by one group only and add the users you want to be able to print to this group.

Greetings !
0
 
LVL 1

Author Comment

by:pablocosta
ID: 1631595
I used to print from the CGI, and then it stopped working.
The CGI uid/gid was _nobody_.
When it stopped working I realized that only root was able to print, but it happened independently of the CGI. When I print with LPR from the shell as root it works and if I do the same as other user (not root) it does not work.
So the CGI was not the problem.
My problem is that I was unable to find a document explaining the way to allow and disallow certain users to use certain printers.

/*
ahoffmann: infamous is coming from a previous question I asked on that area trying to get that problem solved:
http://www.experts-exchange.com/topics/comp/os-linux/setup/Q.10095842
*/
0
 
LVL 1

Expert Comment

by:iNFaMouS
ID: 1631596
thank you for the introduction.. as your're using the past in your comment it sounds like you already solved the problem :-?
Anyway, i can't help you at the moment unfortunately because i could only do it with fiddleing in my system but my screen is broken.. i will have a new one possible between the 4th or 6th of December...

Greetings
0
 
LVL 1

Author Comment

by:pablocosta
ID: 1631597
excuse me again for the looooong delay.
i am checking all that this weekend (I hope :)

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question