Results 1 to 9 of 9

Thread: issue with sudo command

  1. #1
    Join Date
    Mar 2024
    Beans
    5

    issue with sudo command

    Hello,

    I'm having some issues using the sudo command.

    dean@dean:~$ sudo apt install nmap
    [sudo] password for dean:
    dean is not in the sudoers file. This incident will be reported.
    dean@dean:~$

    Can anyone help with the above, I'm brand new to using Linux.

    I'm also using this on virtualbox

    thanks!

  2. #2
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,201
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: issue with sudo command

    Hello thetaipan - Welcome to the Forums

    Sorry about the delay in responding - not much history/info provided and took a bit of time to think the best way forward.

    so - let's get some info.
    Execute terminal command:
    Code:
    groups
    Are both dean and sudo in the output ?

    If so then we may consider that "sudoers" is broken.
    See now if this fix applies:
    http://www.psychocats.net/ubuntu/fixsudo
    Re-itirate what psychocats advises - if this file requires editing then open this file with " sudo visudo " ! As this tool also does error checking.

    an explanation of what this file is:
    https://help.ubuntu.com/community/Sudoers

    we can fix this - not a broken heart
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  3. #3
    Join Date
    Jun 2014
    Beans
    7,388

    Re: issue with sudo command

    First question, did sudo ever work for you since the initial install?

    It does not matter that Ubuntu was installed in Virtual Box. When you installed, you were required to create a user before the install would complete. That user would have root/sudo privileges so either 'dean' is NOT that user or your system is corrupted some way. If you look at the file /etc/group, you should see a line beginning with sudo, There will be a name listed on that line which will be the user (users) with sudo permissions.

    On my system, when I run the 'groups' command both my primary user and sudo show in the output and sudo works exactly as it should.
    Last edited by yancek; March 18th, 2024 at 02:22 PM.

  4. #4
    Join Date
    Mar 2024
    Beans
    5

    Re: issue with sudo command

    Thanks, will take a look.

    This what comes up when trying to type sudo

    dean@dean: $ audo apt install nmap
    [sudo] password entered password
    dean is not in the sudoers file. This incident will be reported.

    thanks

  5. #5
    Join Date
    Mar 2024
    Beans
    5

    Re: issue with sudo command

    and no, it never worked

  6. #6
    Join Date
    Jun 2014
    Beans
    7,388

    Re: issue with sudo command

    Did you try the suggestions made above and just forget to respond? It was suggested you open a terminal and type: groups
    If you did that, you should see sudo in the output as well as any user name for users you created. Did you look at the /etc/group file for a line beginning with sudo. Did you see any user names on that line? If you are not going to follow instructions there isn't much point in use making them.

  7. #7
    Join Date
    Mar 2024
    Beans
    5

    Re: issue with sudo command

    no need to be clown about it, idiot . I'm brand new to all this, and slowly making my way through things. You must feel amazing insulting people, way to go

  8. #8
    Join Date
    Mar 2024
    Beans
    5

    Re: issue with sudo command

    thank you for the reply. I'm a beginner at all this, I can't say I understand everything you said, so will try slowly to work through it

  9. #9
    Join Date
    Oct 2018
    Beans
    178

    Re: issue with sudo command

    thetaipan, welcome to wonderful, but sometimes confusing world of linux.

    Maybe a visual will help with understanding what they would like to see.
    first, try this
    Code:
    whoami
    Code:
    charles:$:whoami
    charles
    Then this, which is what they need to see.
    Code:
    charles:$:groups
    charles adm cdrom sudo dip plugdev kvm lpadmin docker sambashare
    charles:$:
    The first command(whoami) will tell you who the computer thinks you are. The second one (groups) will tell you what groups that person is a member of. If first command does show you as dean,AND the second shows sudo(underlined and bold in my example), then there are other issues. Run those commands and post back the results, then everyone has a starting point.
    Good luck.
    I'm a firm believer that the only stupid question is the one you don't ask.
    Lenovo ideapad320-15iap, 1.1G Intel processor with onboard graphics, x64, 1TB SSD, 8GB ram
    lubuntu 22.04.1, fully updated

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •