- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudo rules
Operating System - HP-UX
1752290
Members
5027
Online
108786
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
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
07-23-2009 12:39 PM
07-23-2009 12:39 PM
sudo rules
I am trying to setup sudo rules for the following conditions:
1) Any user in the "test" group can delete any files created by anyone in the "temp" group. I am not sure if a sudo rule is needed for this or some permissions need to be setup.
2) Users in "test" group can kill or put to sleep any process ran by anyone in the "temp" group.
This is what I have so far:
Host_Alias TEST_BOXES=abcd1234
User_Alias TEST_USERS=
Cmnd_Alias TEST_CMNDS=/usr/bin/kill,\
/usr/bin/sleep
# Rules
TEST_USERS TEST_BOXES = (test) NOPASSWD: TEST_CMNDS
Any help will be appreciated.
Thanks in advance.
1) Any user in the "test" group can delete any files created by anyone in the "temp" group. I am not sure if a sudo rule is needed for this or some permissions need to be setup.
2) Users in "test" group can kill or put to sleep any process ran by anyone in the "temp" group.
This is what I have so far:
Host_Alias TEST_BOXES=abcd1234
User_Alias TEST_USERS=
Cmnd_Alias TEST_CMNDS=/usr/bin/kill,\
/usr/bin/sleep
# Rules
TEST_USERS TEST_BOXES = (test) NOPASSWD: TEST_CMNDS
Any help will be appreciated.
Thanks in advance.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2009 05:22 AM
07-24-2009 05:22 AM
Re: sudo rules
I think you have a misunderstanding of how sudo works. In the sudoers snippet you gave in your original post, the TEST_USERS group of users (I am not sure who these are as the User_Alias is set to null but it might be defined elsewhere so I am not hung on that) are able to run kill and sleep commands (unless you replaced them with some custom scripts, but you should not do that as you know very well) as root user, ending up being able to kill any process on the system.
sudo itself does not discriminate about the ownership or permission of any files. The commands allowed by any directive in /etc/sudoers file, run as root user. Period. So giving access to kill command to someone who is not an experienced sysadmin, via sudo is an open invitation to diseaster.
The functionality you are after, i.e., allowing rights to a certain group members to be able to delete files created by another group member, requires a finely crafted script in my opinion, which is allowed to run via sudo (which is a whole new can of worms, running scripts instead of executables via sudo that is)
sudo itself does not discriminate about the ownership or permission of any files. The commands allowed by any directive in /etc/sudoers file, run as root user. Period. So giving access to kill command to someone who is not an experienced sysadmin, via sudo is an open invitation to diseaster.
The functionality you are after, i.e., allowing rights to a certain group members to be able to delete files created by another group member, requires a finely crafted script in my opinion, which is allowed to run via sudo (which is a whole new can of worms, running scripts instead of executables via sudo that is)
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
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