Solved

choosing who can print

Posted on 1998-11-10
7
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Stressed Out?

Watch some penguins on the livecam!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

690 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