Solved

choosing who can print

Posted on 1998-11-10
7
193 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

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" …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.

749 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