Root (Wiki)

The content of the Security Analogies wiki is now available here, under the GNU Free Documentation License 1.2.

Homeowners

David Baker, in his excellent "Root 101: If you don't 'get it,' you probably haven't got it," uses the following analogy to explain the difference between normal users and root users.

Normal, non-privileged users are like homeowners. They have complete control over their house and can go anywhere and do anything. With Windows, traditionally users are homeowners—they have complete control over the entire system.

Root users are like apartment superintendants. The people that live in the apartment can only access their own apartments (on a computer, their own user account) and common areas like the lobby and laundry room (on a computer, this would be like the /tmp directory). The super, however, can go anywhere and do anything. This is a safer arrangement for the users, since everyone else there can't get into each other's stuff, while still enabling a trusted authority to go anywhere, keep things running, and take care of problems as they pop up.

Dynamite

Another analogy I've used through the years relates to the fact that root (or Administrator) is a double-edged sword. root is very powerful; so powerful that you can pretty much destroy your system with one little slip of the keyboard. So, I tell people that "being logged in as root is like walking around with lit sticks of dynamite in your hands." Instead, do your regular work in a regular user acct. When you find something that's not right which will require root privileges to change, login as root, change it, then get out.

I back this up with "rm -f * .txt", which returns "rm: cannot remove `.txt': No such file or directory not found" The space between "*" and ".txt" means you've just blown away everything in the directory you're in.

As a regular user, you now have to pull stuff out of backups. As root, you likely have a much bigger problem, possibly with other people shouting at you.

For the *nix challenged, "rm" means delete in *nix, and "*" is a "wild card", which matches everything.

WebSanity Top Secret