Debian ordinary users get root privileges |sudo installation and configuration

Source: Internet
Author: User

The Debian system's ordinary users need to install software, often receive "Permission denied" prompt, this time requires root permissions. So how do you have root privileges without logging into the Super Admin account? For most Linux systems, we can use the "sudo" command to get root privileges, or "su" to log into the Super Administrator account to perform various operations that require root privileges.

However, the Debian system does not seem to install sudo by default, so the following explains "How to install sudo and configure its sudoers files"

  1. First login to the Super Administrator account, in the Terminal command line input su , "Enter" key, enter the Super Administrator password, that is, enter the root account
  2. After you enter the command apt-get install sudo, the "Enter" key, the system starts to install sudo (because I have sudo installed, so only the information that has been installed)
  3. Enter command adduser yl sudo, "enter" key
    This means: add my username yl to the sudo group, and everyone will add their own username to the sudo group according to the actual name.
  4. The next step is to configure the sudoers file, which is written by the VI editor.
    -Enter the command vi/etc/sudoers into the sudoers file;
    -In the VI command mode, the input /%sudo Search is positioned to%sudo all = (All:all) All, or manually positioned
    -In VI Insert mode (click the i key), under%sudo all = (all:all) all type yl all = (All:all) all (again, here yl represents my ordinary user name, everyone according to the actual repair Modified
    -In VI command mode, enter : x to exit VI and save the file
  5. Verify that sudo is installed successfully
    Restart the next terminal, enter the command sudo ls , and then enter the user password, if the following words are displayed, there may be sudo installation or configuration problems, need to repeat the above steps;
    YL is not in the sudoers file. This incident would be reported.
    sudo installation and configuration is successful if the following is displayed
    Desktop Documents Downloads Music Pictures public Templates Videos

Debian ordinary users get root privileges |sudo installation and configuration

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.