How to use sudo to delegate LP Spooler Administration
From Wiki-UX.info
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:
- From HP on the security bundle of the HP-UX Internet Express (300+ MB): HP-UX Internet Express for HP-UX 11i v1
- 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
- Managing Systems and Workgroups: A Guide for HP-UX System Administrators Managing Printers
- Gentoo Sudo(ers) Guide
- SUDO(1m) MAINTENANCE COMMANDS