官术网_书友最值得收藏!

The dangers of logging in as the root user

A huge advantage that Unix and Linux operating systems have over Windows is that Unix and Linux do a much better job of keeping privileged administrative accounts separated from normal user accounts. Indeed, one reason that older versions of Windows were so susceptible to security issues, such as drive-by virus infections, was the common practice of setting up user accounts with administrative privileges, without having the protection of the User Access Control that's in newer versions of Windows. (Even with User Access Control, Windows systems still do get infected, just not quite as often.)  With Unix and Linux, it's a lot harder to infect a properly configured system.

You likely already know that the all-powerful administrator account on a Unix or Linux system is the root account. If you're logged in as the root user, you can do anything you want to do to that system. So you may think, "Yeah, that's handy, so that's what I'll do." However, always logging in as the root user can present a whole load of security problems. Consider the following. Logging in as the root user can:

  • Make it easier for you to accidentally perform an action that causes damage to the system
  • Make it easier for someone else to perform an action that causes damage to the system

So if you always log on as the root user or even if you just make the root user account readily accessible, you could say that you're doing a big part of attackers' and intruders' work for them. Also, imagine if you were the head Linux administrator at a large corporation, and the only way to allow users to perform admin tasks was to give them all the root password. What would happen if one of those users were to leave the company? You wouldn't want for that person to still have the ability to log in to the systems, so you'd have to change the password and distribute the new one to all of the other users. And, what if you just want for users to have admin privileges for only certain tasks, instead of having full root privileges?

What we need is a mechanism that allows users to perform administrative tasks without incurring the risk of having them always log on as the root user and that would also allow users to have only the admin privileges they really need to perform a certain job. In Linux and Unix, we have that mechanism in the form of the sudo utility.

主站蜘蛛池模板: 汶川县| 克山县| 商丘市| 和平县| 牡丹江市| 金平| 尼勒克县| 鄂州市| 奈曼旗| 中山市| 新密市| 客服| 遂溪县| 乌兰县| 图们市| 加查县| 黑河市| 泰安市| 同心县| 衡东县| 钦州市| 德江县| 汉沽区| 中西区| 松阳县| 大田县| 万安县| 池州市| 静乐县| 长葛市| 忻城县| 宁明县| 莱芜市| 建湖县| 思南县| 宁阳县| 清河县| 吐鲁番市| 罗江县| 抚顺市| 大安市|