- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Sudo to restrict command execution
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
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
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
01-28-2014 01:19 PM
01-28-2014 01:19 PM
Sudo to restrict command execution
Hi Experts ,
Thanks in advance
My requirement is i want to restrict users to executing commands.
I have 25 users in this server ,the requirement was that will execute only the list of commands (50 commands) ,and restrictall the commands.
Is this achived by sudo or from OS level any other options there.
Ajin.S
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
- Tags:
- sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2014 07:44 AM
01-29-2014 07:44 AM
Re: Sudo to restrict command execution
Sudo is a good tool for allowing the users to execute some sets of commands as some other user.
But if you want to restrict the commands available for the users with their normal user accounts, you will need a restricted shell.
See "man sh-posix" on a HP-UX and read the paragraph titled "rsh Restrictions", or see "man ksh" and read the paragraph titled "rksh Only" for restricted ksh shell.
Basically:
- make copies of all the allowed commands, and place them to some directory (e.g. /usr/rbin)
- configure the /etc/profile or the ~/.profile of the restricted users so that only that directory will be in their PATH
- change the shell of the restricted users to /usr/bin/rsh or /usr/bin/rksh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2014 08:30 PM
01-29-2014 08:30 PM
Re: Sudo to restrict command execution
Hi MK ,
Thank you very much.
Really appriciate you.
Ajin.S
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.