Solved

choosing who can print

Posted on 1998-11-10
7
191 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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Title # Comments Views Activity
How to learn Linux? 10 61
Linux server had an unexpected freeze. How to find out cause (sys logs)? 13 37
winscp 000webhost.com 6 54
linux 13 52
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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 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.

831 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