How to Create a New User and Grant Sudo Privileges to it in Linux Debian

Sdílet
Vložit
  • čas přidán 14. 06. 2024
  • In this video we will create a user for our Linux system and then grant it the sudo privilege. The commands we will use in this tutorial go following.
    Create a new user
    sudo adduser USERNAME
    Note: Replace USERNAME with the username of your choice and after pressing enter, give it the user password.
    Make user sudoer
    usermod -aG sudo USERNAME
    Method 2 of making a user sudoer
    visudo
    Add the following line to the end of file:
    USERNAME ALL=(ALL:ALL) ALL
    Ctrl+X
    Y
    Log into the user account
    su - USERNAME
    Test privileges
    whoami
    sudo whoami
    Logout from an account
    logout
    All Open Source!
    Arashtad provides high quality tutorials, eBooks, articles and documents, design and development services, over 400 free online tools, frameworks, CMS, WordPress plugins, Joomla extensions, and other products.
    More Courses ▶ tuts.arashtad.com/
    Business Inquiries ▶ arashtad.com/business-inquiries/
    Affiliate Programs ▶ arashtad.com/affiliate-programs/
    eBooks ▶ press.arashtad.com/
    Our Products ▶ market.arashtad.com/
    Our Services ▶ arashtad.com/services/
    Our Portfolio ▶ demo.arashtad.com/
    Free Online Tools ▶ tools.arashtad.com/
    Our Blog ▶ blog.arashtad.com/
    Documents ▶ doc.arashtad.com/
    Licensing ▶ arashtad.com/licensing/
    About us ▶ arashtad.com/about/
    Join Arashtad Network ▶ i.arashtad.com/
    Our Social Profiles ▶ arashtad.com/arashtad-social-...
    Vimeo ▶ vimeo.com/arashtad
    Udemy ▶ www.udemy.com/user/arashtad
    GitHub ▶ github.com/arashtad
    Linkedin ▶ / arashtad
    Twitter ▶ / arashtad
  • Věda a technologie

Komentáře • 2

  • @d_sanu
    @d_sanu Před měsícem +1

    This is done so that the "incident will not be reported"

    • @arashtad-tutorials
      @arashtad-tutorials  Před měsícem +1

      Thanks for the comment! Creating a sudo user is a normal part of system administration and actually helps improve security by allowing specific users to run privileged commands without needing the root password.