- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Sudo and root access
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-11-2004 12:53 PM
10-11-2004 12:53 PM
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2004 01:35 PM
10-11-2004 01:35 PM
Solution$ sudo su -
You enter your own password and you then have full root access.
Now the above is assuming that you allow access to the su command via sudo.
This can also be done from within vi. You do a:
# sudo vi /somefile
You then escape to a shell from vi (I forget the exact keystroke) and you have root access as well.
I'm sure there are numerous other examples as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2004 01:39 PM
10-11-2004 01:39 PM
Re: Sudo and root access
If you are running old versions of SUDO, there may be vulnerabilities where ordinary users can exploit them to gain root previliges. So, it is a good idea to have the latest sudo version.
Without you giving the previliges, it is difficult for an ordinary user to break sudo. However, if careful attention is not paid, the syntax of sudoers can actually open up security holes. For ex., for 'userA' you give access to run the command '/directory/bin/some_command'. If this file doesn't exist and if the directory 'bin' is used by userA, then userA can create a script 'some_command' with whatever he/she wants and run it as root.
So, you have to be careful while framing the rules.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2004 04:13 PM
10-11-2004 04:13 PM
Re: Sudo and root access
Yes, i am able to gain root access by using the command that you provided, sudo su - . However, the action of su was tracked in the sulog. Is there anyway where we can gain root access but the action would be shown at any log?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2004 05:37 AM
10-12-2004 05:37 AM
Re: Sudo and root access
sudo vi /etc/hosts
:!sh
id
there you are
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2004 05:44 AM
10-12-2004 05:44 AM
Re: Sudo and root access
If sudo is run by root and the SUDO_USER environment variable is set, sudo will use this value to determine who the actual user is. This can be used by a user to log commands through sudo even when a root shell has been invoked. It also allows the -e flag to remain useful even when being run via a sudo-run script or program. Note however, that the sudoers lookup is still done for root, not the user specified by SUDO_USER.
sudo can log both successful and unsuccessful attempts (as well as errors) to syslog(3), a log file, or both. By default sudo will log via syslog(3) but this is changeable at configure time or via the sudoers file.
This web site is a good reference:
http://www.courtesan.com/sudo/man/sudo.html
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2004 09:33 PM
10-12-2004 09:33 PM
Re: Sudo and root access
find / -perm 4000 -type f
it will give you all files with s bit.
this is the hacking proces:
might be used by sudo:
cp /usr/bin sh ~user/sh
chown root ~user/sh
chmod 4555 ~user/sh
than if user ./sh in his dir he is root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2004 03:30 AM
10-13-2004 03:30 AM
Re: Sudo and root access
If you really want to partition the operating system in a manner that prevents deliberate attack from users to which you've given partial (non-trivial) administrative access, that's considerably more difficult, and a B2, B1, or even A1 certified (via DISA) may be what you need, though these also tend to be clunky and hard to use. There are also a number of "Role-Based Access Control" application vendors that make varying claims about the strength of their solution.
Hope that helps,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2004 03:49 AM
10-13-2004 03:49 AM
Re: Sudo and root access
!/usr/bin/su -,!RLOGIN,KILL
:SU,!/usr/bin/su *root*,!/usr/bin/su "", \
!/usr/bin/su -,!RLOGIN
Here is an extra piece of info you can put in the sudoers file to prevent root access.
Users would have root access to some of the systems. (via sudo) They soon discovered that they could do RLOGIN to another system and gain root there as well. This entry in the sudoers file prevented that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2004 03:59 AM
10-13-2004 03:59 AM
Re: Sudo and root access
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2004 10:20 AM
10-17-2004 10:20 AM
Re: Sudo and root access
Whatever commands you allow to some users, they always find ways to break out. I wrote then http://freshmeat.net/projects/rootsh which is a wrapper around a shell which sends every in/output from the user's terminal to a secure syslog server. In /etc/sudoers we grant /bin/rootsh to our "powerusers". They call "sudo rootsh" and gain root privileges. However, we get a protocol of their keystrokes and can prove it, if they break something.