Vigyata.AI
Is this your channel?

How to Add Sudo Privileges to User in Ubuntu

1.4K views· 6 likes· 2:56· Mar 5, 2024

🛍️ Products Mentioned (9)

In this video, I demystify the process of granting sudo privileges to a user in Ubuntu. Whether you're a Linux enthusiast expanding your skills or a server administrator ensuring efficient user management, this tutorial is tailored to simplify the steps and empower you with the knowledge to elevate user permissions securely. ⭐Offers⭐ 🎁Save One Time Setup Fee on Contabo: https://bit.ly/contabonosetupfee 🎁Get up to 50% off on OVHCloud: https://bit.ly/ovh50off 🎁Claim $200 Server Credits on DigitalOcean: https://bit.ly/digitaloceanfree100 🎁Claim $250 Server Credits on Vultr: https://bit.ly/vultrfree150 🎁Claim $100 Server Credits on Linode: https://bit.ly/linodefree100 🎁Claim €20 Free Credits on Hetzner: https://bit.ly/3Uup6bE 👉How to Add a User with SSH Access on Ubuntu: https://youtu.be/nNtOwb6G_Fs ✅For any further queries or suggestions, feel free to message or email on: 👉Email: hello@technicalsahil.com ✅You can follow and contact me on social media as well: 👉Medium: http://bit.ly/3TXwcVj 👉Quora: https://bit.ly/40R8dtn 👉Github: http://bit.ly/3TZdnBk #SSHAccess #UserManagement #SudoPrivileges #Ubuntu

About This Video

Hello everyone, welcome back to your own channel Technical Sahil. In this video, I show you how you can assign sudo privileges to a user on an Ubuntu system using the command line. I’m continuing from the previous setup where I created a normal user (in my case, “sahil”), and now the goal is to elevate permissions properly so you can manage your server smoothly without staying logged in as root all the time. First, I switch to the root user (either login as root directly or use `su` and enter the root password). After that, I use the exact command `usermod -aG sudo sahil`—this modifies the user and adds them to the sudo group, which is what actually grants sudo access. Then I verify it using `groups sahil` so you can confirm the user is now inside the sudo group. I also show you a common issue where you might still get “not in the sudoers file” right after changes—so I simply logout and login again, and then `sudo whoami` works properly. By the end, you’ll understand how to grant sudo safely, verify it, and test access (even checking root directory access) on Ubuntu.

Frequently Asked Questions

🎬 More from Technical Sahil