In Ubuntu, the traditional UNIX 'root' is blocked (that is, you cannot use root to log on ). the reason for this selection is described later in this article. quick answer: run the command with the root permission. Add the 'sudo' command before each command. For example, sudochownbob *. You will be prompted to enter your password. The password will be saved for 15 minutes. after this time, you will need to re-enter your password. when using Ubuntu
In Ubuntu, the traditional UNIX 'root' is blocked (that is, you cannot use root to log on). The reason for this is described later in this article.
Quick answer
Run the command with the root permission and add the 'sudo' command before each command, for example, sudo chown bob *
You will be prompted to enter your password. The password will be saved for 15 minutes. After this time, you will need to re-enter your password.
We recommend that you use sudo when using Ubuntu.
Start a root shell (for example, a window where you can run the root command) and use: sudo-s
Warning: sudo-s will not change the environment variables ($ HOME, $ PATH, etc.). It has some bad side effects. You can use sudo-I to initialize the entire root environment.
To enable the root account (that is, set a password), use: sudo passwd root
After use, shield the root account from using sudo passwd-l root.
This will lock the root account.
Root permission for the application on the image interface, use either of the following: gksudo [application] Or: kdesu [application]
In ubuntu, kdesu has been replaced with sudo.
The opposite of sudo and gksudo/kdesu may cause File Ownership problems.
Benefits of this model
The benefits of disabling root by default include.
At first, the Ubuntu team wanted the installation to be as simple as possible. Without root, the two user interaction steps during the installation could be omitted. (Colin? Watson)
Furthermore, if root is used during installation, the user will always remember the password they selected, even if they rarely use it. the Root password is often forgotten by users unfamiliar with the Unix security model. (Matt? Zimuman)
He prevents "I can do everything" by default when logging on. 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 directories" without realizing that you are in the wrong directory. It was too late. he practiced "su-command-^ D" for a long time in Unix, instead of staying in the root shell-unless you do serious system maintenance (then you can still use "sudo su "). (Jim? Qita and Andrew? Sopala)
Sudo adds the log records for running commands (in/var/log/auth. log). If you are in trouble, you can always return and see the running commands. (Andrew? Zbikoski)