- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudo need to be configure
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
10-05-2009 09:28 PM
10-05-2009 09:28 PM
sudo need to be configure
I want to give ALL=ALL (except to su to root) aceess to a group.
Please suggest how can we do this with sudo.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2009 09:56 PM
10-05-2009 09:56 PM
Re: sudo need to be configure
Here is the link where you can know everyting about sudo.
http://www.gratisoft.us/sudo/man/sudoers.html#examples
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2009 10:01 PM
10-05-2009 10:01 PM
Re: sudo need to be configure
You'll find your users will start using something like:
sudo /usr/bin/csh
# full root access!
or
cp /usr/bin/ksh $HOME/myrootshell
sudo chown root $HOME/myrootshell
sudo chmod u+s $HOME/myrootshell
./myrootshell
# full root access!
or even something like:
sudo more /etc/hosts
!/usr/bin/sh (a shell escape command for "more")
# full root access!
The easiest way would be to limit the allowed target usernames. For example, if your users in group "appadm" must be able to qrun any commands as appuser1 and appuser2, then the sudo configuration could be like this:
User_Alias APPADMINS = %appadm
Runas_Alias APPUSERS = appuser1, appuser2
APPADMINS ALL=(APPUSERS) ALL
You must then instruct your users to use commands like:
sudo -u appuser1 -i
to get a shell session as appuser1, or
sudo -u appuser1 somecommand
to run individual commands as a particular user.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2009 09:52 PM
10-06-2009 09:52 PM
Re: sudo need to be configure
thanks for reply
There some security risks in your perivious suggesstion
1. when user use /usr/bin/csh,we just get log for first cmd and no log for which user running in csh shell
log output:-
OCT 7 10:06:02 2009 : viney : HOST=bscstest : TTY=pts/0 ; PWD=/home/viney ;
USER=root ; COMMAND=/usr/bin/csh
2. when we using Alias still user can able to su to root that i need to disable
Alias details which im using in sudoers file
User_Alias UNIX=%unixl2
Runas_Alias UNIX_L2=root
UNIX ALL=(UNIX_L2)ALL
UNIX ALL=!/usr/bin/passwd root
....
Waiting for more suggestion on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2009 11:11 PM
10-06-2009 11:11 PM
Re: sudo need to be configure
If you don't want the user to execute a shell on the target user account, don't allow them to start a shell through sudo. And don't allow any command that has the function of starting a shell. And don't allow any command that could be used to deconfigure your restrictions either.
If you allow someone to execute commands as root with no restriction to the set of commands allowed, then that person does not need "su" to become root: s/he has an unlimited number of ways to duplicate the effects of "su".
2.) Yes, definitely. If you try to create a sudo policy by allowing "everything except these commands", you will always end up with allowing too much.
The problem is that the basic Unix tools required to install/maintain/troubleshoot/debug an application running as root can also be used to create an unrestricted and un-logged root access to any user.
The only solution to this problem is to not run applications as root so that you don't have to grant ALL=ALL access to people who are not trusted sysadmins.
If you run the applications on separate user accounts dedicated to this purpose, you can then use sudo to grant people access to those application accounts *only* without giving them root access at all.
Let's start over at the beginning.
You have a group named "unixl2" that needs to do something. You think that requires ALL=ALL style access, which includes unrestricted root access. But the members of the group apparently must not be allowed to become root.
What exactly does the "unixl2" group need to do?
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2009 03:02 AM
10-07-2009 03:02 AM
Re: sudo need to be configure
exactly i want to do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2009 03:22 AM
10-07-2009 03:22 AM
Re: sudo need to be configure
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now