From Wiki-UX.info

Wiki-UX / LP Spooler / How to use sudo to delegate LP Spooler Administration
Jump to: navigation, search

How to use sudo to delegate LP Spooler Administration

Contents

LP Spooler Administration commands

The following is the list of the most common LP Spooler Administration commands:

LP Spooler Commands
/usr/bin/accept
/usr/bin/enable
/usr/bin/cancel
/usr/bin/disable
/usr/sbin/lpadmin
/usr/sbin/lpana
/usr/bin/lpalt
/usr/sbin/lpfence
/usr/sbin/lpmove
/usr/sbin/lpsched
/usr/sbin/lpshut
/usr/bin/lpstat
/usr/sbin/reject

Obtaining Sudo

Sudo package for HP-UX Operating Environment can be obtained from two sources:

  1. From HP on the security bundle of the HP-UX Internet Express (300+ MB): HP-UX Internet Express for HP-UX 11i v1
  2. The Porting and Archive Centre fro HP-UX website: The Porting and Archive Centre for HP-UX website

On this document the Porting Centre version is describe, because it's a smaller component. After installation, check that sudo binary in on the users PATH, for example: /usr/local/bin

Configuring System

1. Create a HP-UX group for the LP Spooler administrators.

# groupadd lpadmins

2. Add users to the lpadmins group

# usermod -G users,lpadmins <username>

3. Use visudo to configure LP spooler command enviroment

# /usr/local/sbin/visudo -f /etc/sudoers
%lpadmins ALL = NOPASSWD: /usr/bin/accept, /usr/bin/enable, /usr/bin/cancel, /usr/bin/disable, /usr/sbin/lpadmin, /usr/sbin/lpana, /usr/bin/lpalt, /usr/sbin/lpfence, /usr/sbin/lpmove, /usr/sbin/lpsched, /usr/sbin/lpshut, /usr/bin/lpstat, /usr/sbin/reject

Additional sudo configurations examples are available on the sample file /usr/local/etc/sudoers.sample.

References

Authors

This page was last modified on 19 July 2010, at 16:46. This page has been accessed 1,622 times.