Root, su, and Linux security paraphrased?

Execute

Well-known member
Apr 20, 2010
96
2
0
Hello, all. Before I rooted my Incredible one of the reasons I was apprehensive was because I didn't understand what I was doing. I got that I would have complete access to my OS, but I didn't know how or why. I went on to root, and have learned a bit here and there, but I wanted to throw out my interpretation of how the rooting process works based on the Linux kernel. I am still trying to learn, so this is more me asking for confirmation rather than passing along info to other users. Anyway, here it goes, pleas let me know if a have a decent grasp on the subject:

OK so on a non-rooted device, I would essentially have what would be considered a normal user account with a non root UID. This grants me a level of access sufficient enough to read only some system settings and change things such as wallpapers, ringtones, etc. It does not grant me write ability to write/change system files/settings or mess with anything in the core OS, or change anything important enough brick my device or render the operating system inoperable. In Linux, when you log onto the system as root there are essentially no safety mechanisms in place in case of an error, as Linux is set up to give root users complete control to change the system as to meet their needs.

Now when I root this device, it would be the equivalent to logging onto the system as a root user rather than a normal user. As root, I now have full read/write access to everything, including crucial OS files. Just like it gives you the power to add some increased functionality, it also gives you the power to cripple your device completely, with one simple wrong command. I now have access to everything and can change anything, both for good and bad.

Now su is where I get a little confused. I believe in a standard Linux system, su, which stands for substitute user, gives you the option to make root level changes without actually logging off as a user and logging on as root. So from what I understand, you run su, enter the root password, then you can complete the command/process that requires root, and then exit su and return to normal user status. I think that is correct. However, on Android I am a little confused with a part of this. Let's take the "Shoot Me" app. When I start that app I grant it su permission. That means it has access to root. But when I am done with it, does that access get denied? When I click "remember" and grant su permission, does it keep su status when the app is closed, or is clicking the "remember" option just mean that it is granted su every time I open the app, then it loses su when I close it, meaning I don't specifically have to grant that permission each time I use the program as my choice is remembered. I was just curious to that part. I see how on a full computer OS that could be dangerous having a process or program sitting in the background with su permissions. On my phone it doesn't seem as big an issue, but still has me curious.

Ok, well, thats what I get out of it. I am hoping I am starting to get a grasp on it anyway. I would appreciate anyone jumping in and correcting me if I got anything wrong, or letting me know if that was pretty accurate. Thanks.
 
Seems like you pretty much understand whats going on. Let me try to make the su part a little clearer for you. On a computer you are actually logged in and you run the applications and you type su to gain root access, you are required to use the password to make sure you have the credintials to do so. What you are doing on your phone is more similar to sudo, which basically doesn't log you in but will give you root access to run a command/program. Once this program/command has ended it would have to be given access again, which is why we use the allow on an application. If you are unsure of an application you should never give it root access.
 
Cool, thanks for the response. I thought I understood the basic concept, but wanted to make sure, as I've never used Linux beside for Android devices. I'm really into hacking/modding, but I find it much easier, and more fun, when I know exactly what I'm doing and how it works. Don't get me wrong, I love love love tools like enrevoked's reflashing tool, and used it myself for my Incredible. Well some people just want to get root as painlessly as possible and ask more questions, I tend to be the exact opposite. I want to know exactly how root works, why each method works, and everything involved with it. With knowledge come power :P Really, tho, I just like to know what I'm doing and how everything works. But yea, I'm interested in programming, developing, hacking, and basically everything computers. Actually going back to school in about a month for Comp Sci. Can't wait. Again, thanks for the response.

If anyone has anything to add, please feel free. I am researching GNU/Linux quite a bit now. I am really interested in the thoughts, theories, and concepts behind Linux, and would like to try it out and see if it fits my style. I'm not one to jump into it just because it is more popular now and people are telling me "how cool Linux is", but am generally interested in the GNU/Linux system. I don't think I am ready to give up windows completely just yet, so I will probably try a distribution from a live CD to start with. If I'm liking it, I may permanently put it on one of my secondary machines or even repartition my laptop(or whatever I need to do) to be able to dual-boot. Who knows, maybe I'll end up buying a GNU/Linux machine in the future and make it my main OS. But, first things first....
 
Cool, thanks for the response. I thought I understood the basic concept, but wanted to make sure, as I've never used Linux beside for Android devices. I'm really into hacking/modding, but I find it much easier, and more fun, when I know exactly what I'm doing and how it works. Don't get me wrong, I love love love tools like enrevoked's reflashing tool, and used it myself for my Incredible. Well some people just want to get root as painlessly as possible and ask more questions, I tend to be the exact opposite. I want to know exactly how root works, why each method works, and everything involved with it. With knowledge come power :P Really, tho, I just like to know what I'm doing and how everything works. But yea, I'm interested in programming, developing, hacking, and basically everything computers. Actually going back to school in about a month for Comp Sci. Can't wait. Again, thanks for the response.

If anyone has anything to add, please feel free. I am researching GNU/Linux quite a bit now. I am really interested in the thoughts, theories, and concepts behind Linux, and would like to try it out and see if it fits my style. I'm not one to jump into it just because it is more popular now and people are telling me "how cool Linux is", but am generally interested in the GNU/Linux system. I don't think I am ready to give up windows completely just yet, so I will probably try a distribution from a live CD to start with. If I'm liking it, I may permanently put it on one of my secondary machines or even repartition my laptop(or whatever I need to do) to be able to dual-boot. Who knows, maybe I'll end up buying a GNU/Linux machine in the future and make it my main OS. But, first things first....

I am in college for computer science as well, so your on the right track man. Programmers use linux more often because its easier to change and learn from code thats working on the machine. I have been using linux for a couple of years, and there are plenty of things I do not understand completely. If you have a netbook or laptop then I would suggest installing Ubuntu netbook edition on it. I installed it on my netbook over the HP recovery partition, it is very small and easy to use distro and would probably help you explore and learn to use the os.
 
If you have a netbook or laptop then I would suggest installing Ubuntu netbook edition on it. I installed it on my netbook over the HP recovery partition, it is very small and easy to use distro and would probably help you explore and learn to use the os.

Cool, thanks, I'll look into it! I was trying to decide on a good distribution. I know Ubuntu is a pretty popular one, but wasn't sure if it was a good "beginner" one. I almost downloaded the live CD version the other day, but didn't have my Flash Drive with me.
 

Trending Posts

Forum statistics

Threads
956,478
Messages
6,968,446
Members
3,163,552
Latest member
danish765