- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Secure OS Software for Linux
- >
- Re: rootsh and sudo problem
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-16-2006 11:20 PM
02-16-2006 11:20 PM
rootsh and sudo problem
I hope someone can help me with this problem.
To make our servers more secure have stopped root access with su and the administartors have to SUDO to run root commands, that is working really well. I have also a logging-program called rootsh to log everything that are done as root, my problem is that to start the logging the admins then they have to "sudo rootsh" and they get a root shell with logging, but it is still possible to "sudo bash" and then they get a root-shell without logging.
What I want is when they use "sudo bash", then the rootsh should be started automaticaly and logg what is happening.
I have not manage to come up with a solution how to get this to work!
Greatful for help!
Cheers
Joppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 11:29 PM
02-16-2006 11:29 PM
Re: rootsh and sudo problem
Another method as writing shell wrapper as,
# mv
# cat > sudo
#!/bin/bash
if [[ $1 = "bash" ]]
then
fi
echo $* | bash
# end
exit 0
###########
Change permission to new sudo file and try now.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2006 11:58 PM
02-16-2006 11:58 PM
Re: rootsh and sudo problem
But This means that I can't add new users to the sudoers file that I only want to let run a few specified commands.
The question is if it is possible to have it so I still easy can add sudo rules for other users also?
/Joppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2006 12:12 AM
02-17-2006 12:12 AM
Re: rootsh and sudo problem
With this script instead of the orginal sudo makes my logg file look like rubbish instead!
/Joppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2006 12:29 AM
02-17-2006 12:29 AM
Re: rootsh and sudo problem
I simply changed the default shell for the admin user to my rootsh, and added rootsh in the /etc/shells. And then I have logging from the first second a admin user loggs in to the server until he loggs out!
Cheers
Joppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2006 06:41 AM
02-17-2006 06:41 AM
Re: rootsh and sudo problem
If sudo bash works you have no security at all and there is almost no reason to use sudo.
The binaries that can be sudo must be limited by the sudoers file to make this setup effective.
Leaving bash available for sudo is a huge back door that needs to be shut.
As far a logging commands, you can set the HISTFILE variable and all commands input by keyboard logged. This can be in the home directores of your various admins or a central location.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com