- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Sudo set up question
Operating System - HP-UX
1753606
Members
5888
Online
108797
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО11-07-2000 11:50 AM
тАО11-07-2000 11:50 AM
--------------------------------------------------------------------------------
I am trying to set up sudo to allow some users to only have rm capabilties in /var/spool/lp/request directory, and every printer under-neath. Sam or restricted sam only allows you to select 1 request at a time. I like the way sudo runs so far but this would GREATLY help out. I already tried tweaking the sudoer file with the following line but it doesnt work. I would imagine I am close but no cigar as of yet.
OPS PROD=PASSWD:/usr/bin/rm /var/spool/lp/request/
Thanks in advance...
I am trying to set up sudo to allow some users to only have rm capabilties in /var/spool/lp/request directory, and every printer under-neath. Sam or restricted sam only allows you to select 1 request at a time. I like the way sudo runs so far but this would GREATLY help out. I already tried tweaking the sudoer file with the following line but it doesnt work. I would imagine I am close but no cigar as of yet.
OPS PROD=PASSWD:/usr/bin/rm /var/spool/lp/request/
Thanks in advance...
Solved! Go to Solution.
- Tags:
- sudo
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 12:13 PM
тАО11-07-2000 12:13 PM
Re: Sudo set up question
I know of no way to configure sudo to allow access ot a command only if the flag passed to the command meets a certain criteria (in the desired directory, in your case).
You might want to simply write a wrapper that colects any number of arguments, checks to make sure no paths are absolute, then does a cd to the directory and passes the argument to rm. Give sudo permissions ot that wrapper, and you are done.
You might want to simply write a wrapper that colects any number of arguments, checks to make sure no paths are absolute, then does a cd to the directory and passes the argument to rm. Give sudo permissions ot that wrapper, and you are done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 12:21 PM
тАО11-07-2000 12:21 PM
Solution
Pretty much ditto, sudo will allow you to execute certain commands as root but the excution of the command will not follow additional conditions, in this situation, the rm of files in a certain directory. As root, you can do the rm command anywhere you want.
You can setup a script (wrapper) that only sudo (root) can execute and in that script it will remove the specified files.
You can setup a script (wrapper) that only sudo (root) can execute and in that script it will remove the specified files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2000 02:19 PM
тАО11-07-2000 02:19 PM
Re: Sudo set up question
I would give them sudo access to
/usr/bin/{cancel,enable,disable}, and
/usr/sbin/{accept,reject}
rather than /usr/bin/rm.
/usr/bin/{cancel,enable,disable}, and
/usr/sbin/{accept,reject}
rather than /usr/bin/rm.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP