- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- System Administration
- >
- SUDO question
-
- Forums
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- OEM Solutions
- Servers: The Right Compute
- Shifting to Software-Defined
- Telecom IQ
- Transforming IT
- Infrastructure Solutions German
- L’Avenir de l’IT
- IT e Trasformazione Digitale
- Enterprise Topics
- ИТ для нового стиля бизнеса
- Blogs
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Forums
-
Blogs
-
InformationEnglish
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-07-2010 11:34 AM
04-07-2010 11:34 AM
1- I created a user alias APP_ADMIN in the sudoers file using visudo:
User_Alias APP_ADMIN = user1, user2
2- I created command alias in the sudoers file as follows:
Cmnd_Alias APP = /pathtoscript/start_servers.sh, /pathtoscript/stop_servers.sh
3- Now I have given the user group APP_ADMIN permission to run the startup and shutdown scripts using visudo as follows:
APP_ADMIN localhost=(oracle) NOPASSWD:APP
4- Now when user1 logs in and issue the startup or shutdown script, he gets the following error:
$ sudo -u oracle /pathtoscript/start_servers.sh
Password:
user1 is not allowed to run sudo on server_01. This incident will be reported.
Any one can please help me out if I am missing some thing here. Or some other way to do this thing. The main idea is to give users access just to start and stop the application as oracle without giving them other rights and priviledges as oracle user.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-07-2010 12:24 PM
04-07-2010 12:24 PM
SolutionAPP_ADMIN server_01=(oracle) NOPASSWD:APP
You could also create a HOST_ALIAS entry with localhost and server_01 as entries.
Something like:
Host_Alias THISHOST=localhost,server_01
Then use THISHOST in you APP_ADMIN definition.
APP_ADMIN THISHOST=(oracle) NOPASSWD:APP
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-07-2010 01:00 PM
04-07-2010 01:00 PM
Re: SUDO question
it would make this config portable, would it not ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-07-2010 08:24 PM
04-07-2010 08:24 PM
Re: SUDO question
I prefer setting host security explicitly for each host. If you do that there is less of a chance of someone getting access they don't really need or aren't entitiled to.
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2019 Hewlett Packard Enterprise Development LP