- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: restricting root from 'su -' to a specific use...
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
02-28-2003 11:59 AM
02-28-2003 11:59 AM
We have a system which a large number have (and need) root access to, and want to restrict many of those people from being able to do 'su - username' where "username" is one specific user. I realize this essentially means "username" is higher security than root, but that is what I want and need.
Currently, sudo or any other form of "controlled access" is not implemented.
Has anyone else done this?
Thoughts/ideas?
TIA,
Steven
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 12:02 PM
02-28-2003 12:02 PM
Re: restricting root from 'su -' to a specific user
That's like asking how to restrict someone who's all powerful. I don't think you can accomplish what you seek.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 12:03 PM
02-28-2003 12:03 PM
Re: restricting root from 'su -' to a specific user
http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063234948
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 12:05 PM
02-28-2003 12:05 PM
Re: restricting root from 'su -' to a specific user
Individual apps, like oracle and whatnot should have less powerful users that own the application and files, and handle startup and shutdown.
root needs the ability to su - to other users. Its essential to the way the OS works internally.
If you figured out how to disable it, you'd have no system when you were done.
sudo is a great way around this issue.
In an ideal security environment, nobody, not even operations should need root password. Restricted sam, and other good tools would let them do their jobs without root access.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 12:11 PM
02-28-2003 12:11 PM
Re: restricting root from 'su -' to a specific user
In your /etc/default/security file define:
SU_ROOT_GROUP=
then in your /etc/group file define:
In this case, only these users have "su" capabilities.
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 12:24 PM
02-28-2003 12:24 PM
Re: restricting root from 'su -' to a specific user
If you dont already have a /usr/local/bin in your users path, get it in as the first entry seen.
Make your own script or program su, and have it do what ever you want. Make sure that users who need the hybred su are accessing /usr/local/bin in their path FIRST, and it will be used first. It does not impact anything that looks elsewhere first for su.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 02:53 PM
02-28-2003 02:53 PM
Re: restricting root from 'su -' to a specific user
As I mentioned, root access on this system is essential without implementing a true security scheme, which can't happen on this 1 system because of what it is used for internally. I'm going to investigate sudo more closely to make sure, and if anyone has any other ideas I'm still open minded. But su to root AND as their user is and will be required, realizing the security issue.
Hmmmmmm, maybe putting the few files we need to protect on an NFS server that is root secure, with root only write access and giving the few people required with 'username' access.
Thanks again for the ideas, past and future!
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 03:10 PM
02-28-2003 03:10 PM
SolutionIn a nut shell what Pete mentioned is correct. You are trying to restrict the superusers here. Even if you put a wrapper script, you cannot do it because they can always execute the original program.
SUDO will not either is not a direct solution for your problem. You can control the users to use SUDO to accomplish their work instead of su'ing to root.
So with the default setup, you cannot do it.
However, there are softwares like eTrust access control that can accomplish what exactly you mentioned. You can even control root. For ex., you can set rules such that root cannot execute password command whereas an ordinary user can. If you can afford to purchasing and implementing this product, here is more information.
http://www.astrom.se/etrust-ac/index.shtml.en
There are other softwares like powerbroker that can do the job too. But I haven't worked on them.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 04:29 PM
02-28-2003 04:29 PM
Re: restricting root from 'su -' to a specific user
I got a very simple solution for you. Move the /usr/bin/su to some other place say /usr/contrib/bin/mysu and then write a c program something like this
#include
#include
#include
#define APUID 0
main(argc,argv)
int argc;
int *argv[];
{
int uid;
char *command=(char *)malloc(2048);
uid=getuid();
if ( uid != APUID ) {
printf ("1:User not authorised \n");
exit(1);
}
strcpy(command,"/usr/contrib/bin/mysu");
if ( system(command) !=0 ) {
printf("1:Failed to do su\n");
exit(1);
}
}
some modification might be required as per u'r needs.
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 11:44 PM
02-28-2003 11:44 PM
Re: restricting root from 'su -' to a specific user
please change
if ( uid != APUID )
to
if ( uid = APUID )
Rajeev