![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Security Discuss UNIX and Linux computer and network security, cybersecurity, cyberattacks, IT security, CISSP, OWASP and more. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sudo, or not sudo: that is the question | iBot | UNIX and Linux RSS News | 1 | 02-07-2008 01:40 PM |
| Sudo question | Zarnick | Linux | 2 | 01-22-2008 08:25 AM |
| Sudo question | Katkota | UNIX for Dummies Questions & Answers | 10 | 01-18-2008 05:35 AM |
| SUDO question - please help | sajjad02 | UNIX for Advanced & Expert Users | 5 | 04-27-2005 11:22 AM |
| sudo question | TRUEST | UNIX for Dummies Questions & Answers | 1 | 01-17-2004 12:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
sudo question
Hi,
Is it possible to stop users from copying a login shell, say bash, to another name and then executing it via sudo to gain root priviliges? Normal users have read access to login shells, so they can copy them without any limitations. How can I stop this? Thanks |
|
||||
|
Thanks for the reply, but I'm still uncertain.
The issue I want to stop is as follows: A user makes a copy of /usr/bin/bash and renames it to /home/user/not_bash. Since the copy has been done under the user's account, and not via sudo, there's no checking to see whether the command is allowed or not. Bash executable has read access for everyone, so making a copy of it is not restricted. Now, what's to stop the user from executing the following: sudo /home/user/not_bash (or any other name) to elevate themselves to root? I do not want to specify every individual command the user is allowed to run via sudo as I would need to list the majority of o/s commands as I want users to be able to perform most system commands, just not be able to elevate to the root account (or any other user's, for that matter). |
|
||||
|
have you read the sudo man pages?
Sudo Manual sudo determines who is an authorized user by consulting the file /etc/sudoers if you have user_A assigned the profile of shutdown and user_A copies the bash file over to user_B in a different location it will not work because user_B is logged in and authenticated already as user_b and the sudo file will check this when they try to login to the shutdown profile. |
|
||||
|
I understand how sudo works.
How does sudo stop my above example from occurring? The user copies the bash executable to another name. This copy occurs with normal acess rights, because /usr/bin/bash has read access for everyone. No sudo authentication has occurred. The user either copies, or moves, bash executabe to another name, say /home/user/this_is_not_bash. Still no sudo authentication. Now, the same user runs "sudo /home/user/this_is_not_bash" Sudo checks sudoers file, and there is no restriction on running /home/user/this_is_not_bash (or any other name the user decides on) The user has now been elevated to root. Bash executable has NOT been copied to another users profile, it is being used to elevate (or switch) to another users account. How do I stop this from occurring? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|