Ubuntu system root Permission Command sudo usage guide

Source: Internet
Author: User
Keywords Run user can use guide password
Tags example guide linux name password root run system

In Linux (and normal Unix), the name of the superuser is called Root. Windows corresponding to the root account is the Administrator. Super users can do anything, so the superuser becomes dangerous in their daily work. You can enter a wrong command to destroy the entire system. Theoretically, the user you run should have just the right to the task at hand. In some cases, it requires root, but most of the events are normal users.

The Ubuntu root account is locked by default. This means that you cannot log in as root or use SU. Instead, Setup will establish and set sudo to http://www.aliyun.com/zixun/aggregation/18736.html during the installation process to allow users to run all administrative commands.

It means that you can use sudo for commands that require root permissions under the terminal. Using a program on the menu will use a graphical sudo to prompt for a password. When Sudo asks for a password, it needs your user password; This means that the root password is not required.

Description:

The password is saved for 15 minutes by default. Over this time, you will need to re-enter your password.
However, when you enter your password, it will not appear on the screen, and there will not even be a row of asterisks. However, this is normal!
Using sudo to run the graphical setup tool, you can simply run the program through a menu.
For "Ubuntu" users, use Gksudo to run the program, such as running gedit, press ALT+F2 and enter Gksudo gedit.
For Kubuntu users, use Kdesu or Kdesudo.
Run sudo at the command line, plus sudo before the command, as follows:

Example #1

sudo chown bob:bob/home/bob/*

Example #2

sudo/etc/init.d/networking restart

Do not use sudo to run a graphics program. You should run these programs Gksudo or KDESU, or you may fail when you log on again. If you are prompted with the following error report when landing: "Unable to read ICE authority file", use your account name to replace the following user using the login failure terminal and running the following command.

rm/home/*/. {ice,x}authority

Start a root shell (example. A window that you can allow the root command) to use:

Sudo-i

Allow other users to run sudo

Add a new user to sudo and open the users and Groups tools from the System--> Administration menu. Then click on the user and continue to open the properties. Select the User privileges page. On this page, find executing system administration tasks and select.

Tip: You can do this in a terminal: sudo adduser $user admin, where you use the user's name to replace the $user.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.