Transcript
The full narration, chapter by chapter. Click a time to play the video from there.
Intro
Seeing "user is not in the sudoers file"? Your account just isn't allowed to use sudo yet. Here's how to fix it, safely.
What it means
It means exactly that: your user isn't in the admin group, so sudo refuses to run.
Add to the group
Log in as root, or with another user that has sudo. Then add your user to the admin group. On Debian or Ubuntu, that's usermod -aG sudo yourusername. On AlmaLinux or Rocky, the group is wheel.
Log in again
Now log out, and log back in. Group changes only apply to new sessions. Then try sudo again.
Locked out?
No root access at all? Use the console in your client area, or rescue mode. Never edit the sudoers file directly. Use visudo, which checks the file before saving. And if sudo itself is missing, install it as root.
Recap
That's it: add the user to sudo or wheel, log in again, and edit with visudo. More Linux guides at esagames.ro.


