sudoers 🐧 Linux

user is not in the sudoers file. This incident will be reported.

Your account isn’t allowed to use sudo.

Seen on: Linux

Meaning

sudo access comes from /etc/sudoers or group membership (sudo on Debian/Ubuntu, wheel on RHEL/Fedora). New users on servers and some fresh desktop installs don’t have it.

Common causes

  • User not in the sudo/wheel group
  • Group added but session not refreshed (log out/in)
  • Broken sudoers file after manual editing

⚡ Quick fix

  1. As root: usermod -aG sudo username (Ubuntu) or usermod -aG wheel username (RHEL)
  2. Log out and back in
  3. Always edit sudoers with visudo

Detailed fix by platform

Linux

  1. Grant sudo (run as root, e.g. su -):
    bash
    usermod -aG sudo deploy       # Debian/Ubuntu
    usermod -aG wheel deploy      # RHEL/CentOS/Fedora
    groups deploy

How to diagnose

  1. Groups — groups — sudo or wheel present?
  2. Session — Logged in again since?
  3. Config — visudo -c passes?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.