Ubantu is a relatively large Linux release version, and the issues related to the Linuxroot permission are worth discussing. New users (baseondebian) who are new to Ubuntu are usually 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 UbantuLinuxroot permission. How do I set/change/enable the password of the root user? Enable
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?
Enable the root account (that is, set a password)
$ sudo passwd root[sudo] password for denghp:Enternew UNIX password:Retypenew UNIX password: passwd: password updated successfully
Root Account Disabled
$ Sudo passwd-l rootpasswd: password expiry information changed. # verify whether to disable $ sudo-# Or $ sudo rootPassword: su: Authentication failure # enter the correct password. If a prompt is displayed, the password is disabled.
In terminal mode, how does one switch to the root identity?
$ Sudo-# Or $ sudo rootPassword: # specify your password here> the benefits of disabling root by default include.
- At first, the Ubuntu development team wanted to install as simple as possible without setting root. In this way, user settings can be left out during the installation process.
- If the root password is set during installation, the user will be asked to always remember the password they set-even if it is rarely used. users who are unfamiliar with the Unix security model often forget the Root password.
- It prevents some operations that may easily affect the system directory or system settings during default login, or operations that may affect the system stability or security, and will be prompted to enter a password, this allows you to consider your results. if you log on as the root user, your operations will not be prompted, but if your operation is wrong, you will not be saved. it allows a long time to use the "su-command-^ D" operation, instead of working in the root shell, unless you perform major system maintenance (then you can still use "sudo su ").
- Sudo adds a log record for running commands (in/var/log/auth. log). If you are in trouble, you can always return and see the running commands.
Security Questions
- Compared with the traditional superuser model, this method has different advantages and disadvantages, and neither of them is always good.
- When the root permission is encouraged to execute a separate command, sudo is better than opening a shell
- Reduces the total time spent on using 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.