Solved

choosing who can print

Posted on 1998-11-10
7
188 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
Comment Utility
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
Comment Utility
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
Comment Utility
probably the user    lp    must also be in this group
and/or own the directories
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Expert Comment

by:iNFaMouS
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
excuse me again for the looooong delay.
i am checking all that this weekend (I hope :)

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now