- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudo - how to allow lp cmds for a non-root user
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 03:24 AM
04-11-2006 03:24 AM
Just installed sudo 1.6.8p12 (11.0, 11.11 and 11.23)
Need to give access to non-root user ( operator) to
1) list print jobs
2) cancel jobs
3) mount nfs
4) umount nfs
5) add users
how to do this.
Thanks and Appreciate your help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 03:48 AM
04-11-2006 03:48 AM
Re: sudo - how to allow lp cmds for a non-root user
you just need to edit /etc/sudoers to grant permissions to various commands.
=> man sudoers will give you detailed information on rich features of this file.
A simple example :
User_Alias MYUSERS = joe, john
MYUSERS jupiter = NOPASSWD: EXEC: /usr/sbin/ioscan
will allo users joe, john to use ioscan command by running:
sudo /usr/sbin/ioscan
H.T.H.
antonio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 05:59 AM
04-11-2006 05:59 AM
Re: sudo - how to allow lp cmds for a non-root user
First you need to create a Command_Alias, for all the commands which you want to be executed from the specific list of users.
Ex: Cnmd_Alias SU = /usr/bin/su
Then you need to create a User_Alias, which will have all the users list.
ExL User_Alias TEST=joe, john, robert
Finally, grant privilege statement, to allow users to execute those commands.
Ex:
In this example, TEST = PASSWD:SU
Hope it works,
Ram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 07:08 AM
04-11-2006 07:08 AM
Re: sudo - how to allow lp cmds for a non-root user
Just another thought.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 07:13 AM
04-11-2006 07:13 AM
Re: sudo - how to allow lp cmds for a non-root user
%helpdesk ALL=NOPASSWD:ALL, /usr/sbin/accept,/usr/sbin/reject,/usr/sbin/lp
sched,/usr/bin/cancel,/usr/bin/cancel -e,/usr/bin/cancel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 07:44 AM
04-11-2006 07:44 AM
Re: sudo - how to allow lp cmds for a non-root user
Robert,
pl can you tell me the steps to give sam -r for the user operator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 08:07 AM
04-11-2006 08:07 AM
Solutionyou have to be root
sam -r
cancel the "Load Priviliges" window
right click in the Restricted SAM Builder window - Disable All
Right click on the Accounts for Users and Groups Icon - Enable All ( note - you may want to restrict your operators further and can go within this Icon for more refinement)
Right Click on Printers and Plotters Icon - enable all ( same note is applicable)
Actions -> Templates -> Save - name it what you like (operators)
now close sam and go back into Restricted SAM - sam -r
highlight the user you want to have the restrcted sam priveleges - highlight template to be loaded (operator)
OK
Actions
Save Priveleges
Now here's a little shortcut - you will note that this has generated a file in /etc/sam/custom/
you can easily copy this fiule for other users (they naturally need to already be users on the system) as in
cp /etc/sam/custom/username.cf /etc/sam/custom/newusername.cf
You can also use this to scp to other servers. saves a lot of time.
HTH