HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudo user unable to execute
Operating System - HP-UX
1827810
Members
2105
Online
109969
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
Forums
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
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
09-10-2009 12:27 PM
09-10-2009 12:27 PM
sudo user unable to execute
Hi All :
I am getting the following for a sudo user :
"Sorry, user richard is not allowed to execute '/usr/bin/kill -hup 15284' as root on pwpsp."
The sudoers file is set as :
richard ALL=/apps/dlc101b/bin/proshut, /usr/bin/kill
Any help is greatly appreciated.
Regards,
Ramamurthy Dasari
I am getting the following for a sudo user :
"Sorry, user richard is not allowed to execute '/usr/bin/kill -hup 15284' as root on pwpsp."
The sudoers file is set as :
richard ALL=/apps/dlc101b/bin/proshut, /usr/bin/kill
Any help is greatly appreciated.
Regards,
Ramamurthy Dasari
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2009 12:33 PM
09-10-2009 12:33 PM
Re: sudo user unable to execute
Probably a syntax error. That entry doesn't look right to me. Did you use visudo to edit the sudoers file? It'll catch syntax errors nicely. Try:
richard ALL=(root) /apps/dlc101b/bin/proshut, /usr/bin/kill
Of course, giving someone blanket kill privileges like this is pretty dangerous stuff.
richard ALL=(root) /apps/dlc101b/bin/proshut, /usr/bin/kill
Of course, giving someone blanket kill privileges like this is pretty dangerous stuff.
--
Jeff Traigle
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2009 12:41 PM
09-10-2009 12:41 PM
Re: sudo user unable to execute
Jeff :
Thanks for the quick response. The syntax was correct as posted. I had even tried the way you stated but still getting the same error.
Also what do you mean by blanket kill priviledges.
Thanks & Regards,
Ramamurthy Dasari
Thanks for the quick response. The syntax was correct as posted. I had even tried the way you stated but still getting the same error.
Also what do you mean by blanket kill priviledges.
Thanks & Regards,
Ramamurthy Dasari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2009 01:09 PM
09-10-2009 01:09 PM
Re: sudo user unable to execute
I seem to recall having some issues having multiple commands directly in the line like that. Maybe my mind playing tricks on me. I always use aliases in sudoers. Keeps things more organized for complex configurations and avoids the problem. Might try something like this and see if you have better luck:
User_Alias SOMEGUY = richard
Cmnd_Alias SOMEGUY_CMNDS = /apps/dlc101b/bin/proshut, /usr/bin/kill
SOMEGUY ALL=(root) SOMEGUY_CMNDS
(You can name the aliases whatever you like.)
As for the danger of giving someone open access to the kill command this way... with no restriction on what they can kill, there's nothing to stop him from killing any process on the system... any OS process, database, application, etc. One typo or malicious execution and the system/database/application could come down in a very unpleasant manner. If there are only certain processes the user should really have a need to kill as root, I'd create a wrapper script to be sure those processes are the only ones they could kill. If all of the processes are owned by a particular non-root user, you could also safeguard the system somewhat better by putting that user in the config instead of root, like this:
Runas_Alias OTHERUSER = somename
SOMEGUY ALL=(OTHERUSER) /usr/bin/kill
Also, be concerned about file and directory permissions for commands you grant access to, especially ones allowed to run as root. The person shouldn't be able to change /apps/dlc101b/bin/proshut by having write permission to it or the directory /apps/dlc101b/bin if they are allowed to run the command as root. That's another avenue for them to do whatever they want to do on the system.
User_Alias SOMEGUY = richard
Cmnd_Alias SOMEGUY_CMNDS = /apps/dlc101b/bin/proshut, /usr/bin/kill
SOMEGUY ALL=(root) SOMEGUY_CMNDS
(You can name the aliases whatever you like.)
As for the danger of giving someone open access to the kill command this way... with no restriction on what they can kill, there's nothing to stop him from killing any process on the system... any OS process, database, application, etc. One typo or malicious execution and the system/database/application could come down in a very unpleasant manner. If there are only certain processes the user should really have a need to kill as root, I'd create a wrapper script to be sure those processes are the only ones they could kill. If all of the processes are owned by a particular non-root user, you could also safeguard the system somewhat better by putting that user in the config instead of root, like this:
Runas_Alias OTHERUSER = somename
SOMEGUY ALL=(OTHERUSER) /usr/bin/kill
Also, be concerned about file and directory permissions for commands you grant access to, especially ones allowed to run as root. The person shouldn't be able to change /apps/dlc101b/bin/proshut by having write permission to it or the directory /apps/dlc101b/bin if they are allowed to run the command as root. That's another avenue for them to do whatever they want to do on the system.
--
Jeff Traigle
Jeff Traigle
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.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP