- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudo entry
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
03-23-2006 02:33 AM
03-23-2006 02:33 AM
sudo entry
Putting in an entry in sudoers file that allow a given user to do chown/chgrp AS ROOT - but restrict other root commands?
Thanks....Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 02:50 AM
03-23-2006 02:50 AM
Re: sudo entry
myuser ALL = /usr/bin/chown *, /usr/bin/chgrp *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 02:51 AM
03-23-2006 02:51 AM
Re: sudo entry
${user} ALL=(ALL) /bin/chown, /bin/chgrp
in the sudoers will do exactly what you're looking for. Realize that gives the user the ability to chown *any* file on the system. If you give them chmod as well, you've just given them the system:
cp /bin/ksh /tmp/.my_root_hack
sudo /bin/chown root:sys /tmmp/.my_root_hack
sudo /bin/chmod 4755 /tmp/.my_root_hack
will give the user a root owned suid ksh.
sudo is a great command; however, you need to be careful with it...
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 02:52 AM
03-23-2006 02:52 AM
Re: sudo entry
Sorry for the confusion.
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 02:54 AM
03-23-2006 02:54 AM
Re: sudo entry
user ALL=/usr/bin/chown,/usr/bin/chgrp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 03:07 AM
03-23-2006 03:07 AM
Re: sudo entry
sudoer's excerpt
User_Alias SPECIAL = tom,dick,harry
Runas_Alias RT = root
Cmnd_Alias CHOWN = /usr/bin/chown
Cmnd_Alias CHGRP = /usr/bin/chgrp
SPECIAL ALL = (RT) CHOWN, CHGRP
This would allow users tom, dick, and harry to run chown and chgrp as root.
Note that there is a danger to this because you have also allowed these users to create setuid root programs w/o explicitly granting that ability -- so be careful what you ask for.