Results 1 to 10 of 10

Thread: Unable to sudo upgrade or update

  1. #1
    Join Date
    Jan 2024
    Beans
    6

    Post Unable to sudo upgrade or update

    Hi All,

    I recently installed Ubuntu on my Windows 10 machine in Virtual box. The install went through fine as I didn't see any errors. I got to the login screen and logged in. I went to run sudo apt get upgrade and apt get update, and got the following error:

    "user is not in the sudoer group, access is denied"? I have never seen this before, I am rusty on Ubuntu at the moment but did I miss something?

    Thanks

  2. #2
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Unable to sudo upgrade or update

    Just add your user to that group:
    Code:
    su -
    usermod -a -G sudo vboxuser
    If "su -" don't work use "sudo -s"
    Shown here:
    Code:
    su -
    Password: 
    su: Authentication failure
    ┌───────────────────>
    │~ 
    └─> sudo -s
    [sudo] password for me: 
    root@me-on-zfs:/home/me#
    Last edited by 1fallen; January 30th, 2024 at 07:16 PM.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  3. #3
    Join Date
    Jan 2024
    Beans
    6

    Re: Unable to sudo upgrade or update

    Ok I will try that when I get home and update. I'm working on setting up a Ubuntu, and Backtrack that I can go back and forth between. Got get this stable first.

  4. #4
    Join Date
    Jan 2024
    Beans
    6

    Re: Unable to sudo upgrade or update

    Ok, I tried the above. I was able to use sudo - and it logged me into root. Once into root, I tried the usermod command and got no errors. I ended up running all the updates while in root with no issues. As soon as I went back to the regular user that I was trying to add I tried to run updates again and got: "could not open lock file - permission denied", somewhat paraphrased. Thoughts?

  5. #5
    Join Date
    May 2010
    Beans
    3,320

    Re: Unable to sudo upgrade or update

    Did you prefix the command with sudo? If so then I suggest a reboot of the VM if possible. If the issue persists then we can unlock the lock file.

  6. #6
    Join Date
    Jan 2024
    Beans
    6

    Re: Unable to sudo upgrade or update

    I did prefix with sudo. I also did a reboot but I can reboot again. I know I didn't see any error when trying to add the user. If the reboot doesn't work how do we unlock the lock file? Thanks.

  7. #7
    Join Date
    May 2010
    Beans
    3,320

    Re: Unable to sudo upgrade or update

    Quote Originally Posted by jctech2025 View Post
    I did prefix with sudo. I also did a reboot but I can reboot again. I know I didn't see any error when trying to add the user. If the reboot doesn't work how do we unlock the lock file? Thanks.
    Code:
     
    sudo fuser -vki /var/lib/dpkg/lock
    sudo dpkg --configure -a
    Should do it

  8. #8
    Join Date
    Jan 2024
    Beans
    6

    Re: Unable to sudo upgrade or update

    Ok thanks I will try that and update.

  9. #9
    Join Date
    Oct 2008
    Location
    Rezzoaglio (GE) Italy
    Beans
    692
    Distro
    Ubuntu Development Release

    Re: Unable to sudo upgrade or update

    Check if you have 'sudo' group
    Code:
    groups

  10. #10
    Join Date
    Jan 2024
    Beans
    6

    Re: Unable to sudo upgrade or update

    There we go. I was able to run sudo apt-get update after running the lock file fix.

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
  •