user is not in sudoers file | fix sudo error in ubuntu
Fix the “user is not in sudoers file” error in Ubuntu Linux by adding a user to the sudo group and restoring sudo privileges.
In this Linux tutorial, you’ll learn what causes sudo permission errors and how to fix them step by step using simple terminal commands.
This guide is perfect for beginners starting with Linux, DevOps, cybersecurity, or cloud computing.
---
✔ What you’ll learn:
How to fix the “not in the sudoers file” error in Linux
What causes this sudo error
How to add a user to the sudoers file (grant sudo access)
Basic Linux commands like `sudo usermod -aG sudo` and `su - username`
---
✔ Commands used:
sudo usermod -aG sudo devEngineer
su - username
---
This tutorial is designed for complete beginners with no prior Linux experience.
If you're learning Linux for DevOps, cybersecurity, networking, or AWS, fixing sudo permission errors and managing user privileges is an essential skill.
---
🎯 Next Video:
👉 How to Create User in Linux with command 'useradd'
• Why System Admins Use useradd (Not the GUI)
📺 Playlist (Linux for Beginners):
👉 • Linux Commands for Beginners | Linux Admin...
🔗 Related Videos:
👉 Remove Users from Linux in 30 Seconds
• Remove Users from Linux in 30 Seconds
👉 List Users in Linux (30-Second Linux Tutorial)
• List Users in Linux (30-Second Linux Tutor...
👉 chmod +x Didn’t Fix Permission Denied? Try This Next
• Permission Denied Even After chmod +x? Try...
---
⏱️ Timestamps:
00:00 – Fix “User is not in the sudoers file” error
00:08 – Why the error happens
00:27 – Check current user with `whoami`
00:43 – Non-root user and sudo permissions explained
00:55 – Add user to sudoers (grant sudo access)
01:05 – Switch user and apply changes
01:15 – Run sudo command after fix
01:26 – Verify sudo privileges
---
#linux #linuxtutorial #linuxcommands #devops #sudo #ubuntu #cybersecurity #cloudcomputing