HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sudo and allowing a user access to all but one...
Operating System - HP-UX
1833758
Members
2618
Online
110063
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
02-18-2004 07:11 AM
02-18-2004 07:11 AM
sudo and allowing a user access to all but one command
cat /etc/sudoers
Host_Alias HOST1=riddler
User_Alias USER1=mahrendt
Cmnd_Alias COMMANDS1=ALL
root ALL=(ALL) ALL
USER1 HOST1=COMMANDS1
how can i modify the above to actaully allow mahrendt to sudo all commands except "shutdown" for example
i was thinking it would be something like the following
Cmnd_Alias COMMANDS0=/sbin/shutdown
USER1 HOST1=ALL, !COMMANDS0
i know a smart user could rename shutdown to run it or escape to a shell from an app to run it ...so i know this is not bullet proof but will help me out in my particular situation
Host_Alias HOST1=riddler
User_Alias USER1=mahrendt
Cmnd_Alias COMMANDS1=ALL
root ALL=(ALL) ALL
USER1 HOST1=COMMANDS1
how can i modify the above to actaully allow mahrendt to sudo all commands except "shutdown" for example
i was thinking it would be something like the following
Cmnd_Alias COMMANDS0=/sbin/shutdown
USER1 HOST1=ALL, !COMMANDS0
i know a smart user could rename shutdown to run it or escape to a shell from an app to run it ...so i know this is not bullet proof but will help me out in my particular situation
hola
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2004 07:16 AM
02-18-2004 07:16 AM
Re: sudo and allowing a user access to all but one command
Hi Marc,
Did you try it?. If it is not working then try
Cmnd_Alias COMMANDS0=!/sbin/shutdown
and specify
USER1 HOST1=(ALL) ALL COMMANDS0
-Sri
Did you try it?. If it is not working then try
Cmnd_Alias COMMANDS0=!/sbin/shutdown
and specify
USER1 HOST1=(ALL) ALL COMMANDS0
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2004 08:11 AM
02-18-2004 08:11 AM
Re: sudo and allowing a user access to all but one command
Marc,
What you have already will work. Like you said it's not bulletproof....heck, it's not even really bullet resistant ;-)
What you have already will work. Like you said it's not bulletproof....heck, it's not even really bullet resistant ;-)
Remember, wherever you go, there you are...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2004 06:01 AM
03-16-2004 06:01 AM
Re: sudo and allowing a user access to all but one command
just wanted to state that sudo worked as i had detailed above ...and greatful for the feedback
hola
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP