Article Title: detailed analysis of UbantuLinuxroot permissions. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Ubantu is a relatively large Linux release version, and the issues related to Linux root permissions are worth discussing. Most people who are new to ubuntu (base on debian) are confused about the reason because the root password is not prompted during installation. According to the ubuntu Chinese document, I have summarized this article. After reading this article, I will be clear about the Ubantu Linux root permission.
How do I set/change/enable the password of the root user?
Sudo passwd root
To enable the root account (that is, set a password:
Sudo passwd root
After you use it, block the root account from using it:
Sudo passwd-l root
This will lock the root account.
In terminal mode, how does one switch to the root identity?
Sudo-s-H
Password: <在这注明您的密码> The benefits of disabling root by default include.
At first, the Ubuntu team wanted to install as simple as possible. Do not use root. The two user interaction steps during installation can be omitted.
Furthermore, if root is used during installation, the user will be asked to always remember the password they selected? Even if they seldom use it. The Root password is often forgotten by users who are unfamiliar with the Unix security model.
It prevents the default logon time from "I can do anything "? Before a major change occurs, you will be prompted to enter a password, which allows you to consider your results. If you log on as the root user, you can delete some "useless Folders" without realizing that you are in the wrong directory. It was too late. It uses "su-command-^ D" for a long period of time in Unix, instead of staying in the root shell? Unless you do serious system maintenance (then you can still use "sudo su "). Sudo adds log records for running commands (in/var/log/auth. log ). If you are in trouble, you can always return and see the running commands.
Security
Compared with the traditional superuser model, this method has different advantages and disadvantages, and both of them do not always show excellent performance.
When we encourage the use of Linux root permissions to execute a separate command, sudo is better than opening a shell:
Reduces the total time spent on using Linux root permissions, and reduces the risk of not paying attention to using root to execute commands
Provides useful review traces
There is a separate root Password (traditional model) that provides an additional layer of protection when an administrator's password is compromised.
In any case, if the administrator (using sudo or su to become root) is attacked, attackers can generally obtain the root user through an indirect attack.