<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: prevent user from printing in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867612#M97646</link>
    <description>If this was a common practice at your organization, you might want to create a printers.deny file. Put in it the usernames that you want to deny access to particular printers--one line each, with username and the printers that they will be denied access to:&lt;BR /&gt;&lt;BR /&gt;DPATH=/etc&lt;BR /&gt;DFILE=printers.deny&lt;BR /&gt;IAM=`echo $0|awk -F\. '{ print $2 }'`&lt;BR /&gt;if test -f $DPATH/$DFILE&lt;BR /&gt;then&lt;BR /&gt;     LINE=`grep $USER $DPATH/$DFILE`&lt;BR /&gt;     DUSER=`echo $LINE|awk '{ print $1 }'`&lt;BR /&gt;     DPRINTER=`echo $LINE|awk '{ print $2 }'`&lt;BR /&gt;     if test "$DPRINTER" = "$IAM"&lt;BR /&gt;     then&lt;BR /&gt;         echo "Access denied to $IAM"&lt;BR /&gt;         exit 1&lt;BR /&gt;     fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;This could be added to any and all scripts in /etc/lp/interface.&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Chris</description>
    <pubDate>Thu, 19 Dec 2002 17:14:47 GMT</pubDate>
    <dc:creator>Chris Vail</dc:creator>
    <dc:date>2002-12-19T17:14:47Z</dc:date>
    <item>
      <title>prevent user from printing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867607#M97641</link>
      <description>Hi all,&lt;BR /&gt;How could I prevent normal user from printing to a particular print queue in the LP spooler?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Thu, 19 Dec 2002 09:31:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867607#M97641</guid>
      <dc:creator>S.C. Fun</dc:creator>
      <dc:date>2002-12-19T09:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: prevent user from printing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867608#M97642</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;as far as i know there is no spooler functionality to do this.&lt;BR /&gt;A trick could be to move your lp-command and set a script at the original place which could check the user-id. If it's a allowable user then it can give all options and the file to print on to the original lp-command.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Dec 2002 10:44:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867608#M97642</guid>
      <dc:creator>Heinz Gaertner</dc:creator>
      <dc:date>2002-12-19T10:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: prevent user from printing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867609#M97643</link>
      <description>You can modify the standard interface scripts to check if a "user" is allowed to print or not (send a mail if printing was refused).&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Dec 2002 10:57:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867609#M97643</guid>
      <dc:creator>Armin Feller</dc:creator>
      <dc:date>2002-12-19T10:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: prevent user from printing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867610#M97644</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;here what you can do:&lt;BR /&gt;&lt;BR /&gt;# vi /var/spool/lp/interface/&lt;PRINTERNAME&gt;&lt;BR /&gt;&lt;BR /&gt;and insert following:&lt;BR /&gt;&lt;BR /&gt;    user=$2&lt;BR /&gt;    if [ $user = "arminfeller" ]&lt;BR /&gt;    then&lt;BR /&gt;   exit 0&lt;BR /&gt;    fi&lt;BR /&gt;&lt;BR /&gt;Please put this directly under the line:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh &lt;BR /&gt;&lt;BR /&gt;This will cancel each printjob to this printer which comes from the user named arminfeller.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Armin&lt;/PRINTERNAME&gt;</description>
      <pubDate>Thu, 19 Dec 2002 15:18:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867610#M97644</guid>
      <dc:creator>Armin Feller</dc:creator>
      <dc:date>2002-12-19T15:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: prevent user from printing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867611#M97645</link>
      <description>I just reset the guys password, though HR or management usually gets annoyed.  &lt;BR /&gt;&lt;BR /&gt;:-)</description>
      <pubDate>Thu, 19 Dec 2002 15:59:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867611#M97645</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2002-12-19T15:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: prevent user from printing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867612#M97646</link>
      <description>If this was a common practice at your organization, you might want to create a printers.deny file. Put in it the usernames that you want to deny access to particular printers--one line each, with username and the printers that they will be denied access to:&lt;BR /&gt;&lt;BR /&gt;DPATH=/etc&lt;BR /&gt;DFILE=printers.deny&lt;BR /&gt;IAM=`echo $0|awk -F\. '{ print $2 }'`&lt;BR /&gt;if test -f $DPATH/$DFILE&lt;BR /&gt;then&lt;BR /&gt;     LINE=`grep $USER $DPATH/$DFILE`&lt;BR /&gt;     DUSER=`echo $LINE|awk '{ print $1 }'`&lt;BR /&gt;     DPRINTER=`echo $LINE|awk '{ print $2 }'`&lt;BR /&gt;     if test "$DPRINTER" = "$IAM"&lt;BR /&gt;     then&lt;BR /&gt;         echo "Access denied to $IAM"&lt;BR /&gt;         exit 1&lt;BR /&gt;     fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;This could be added to any and all scripts in /etc/lp/interface.&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Chris</description>
      <pubDate>Thu, 19 Dec 2002 17:14:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/prevent-user-from-printing/m-p/2867612#M97646</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2002-12-19T17:14:47Z</dc:date>
    </item>
  </channel>
</rss>

