Share via

Cannot issue APT-GET UPDATE on STIG Ubuntu 18.04

J Wall 20 Reputation points
Jun 24, 2024, 4:16 PM

Hello,

I have deployed a Virtual Machine with a STIG Ubuntu 18.04 image. I have successfully accessed the machine via SSH and started issuing commands; however, I am unable to run apt-get update, apt-get upgrade, etc. I have tried these commands with sudo, but it claims the password is incorrect although I have set it using passwd. How can I run apt-get update and related commands?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,222 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jackson Martins 10,566 Reputation points MVP
    Jun 24, 2024, 4:25 PM

    Hi J Wall

    Ensure your user is listed in the /etc/sudoers file. You can check this by running visudo, Look for a line that gives your user sudo privileges. It should look something like this:

    your_username ALL=(ALL:ALL) ALL
    

    If the sudo command continues to fail, you can try switching to the root account directly. However, this approach is generally not recommended for regular use. First, enable the root account if it’s not already enabled

    sudo -i
    sudo passwd root
    

    Verify that Advance package Tool (APT) is configured to prevent the installation of patches, service packs, device drivers, or Ubuntu operating system components without verification they have been digitally signed using a certificate that is recognized and approved by the organization. Check that the "AllowUnauthenticated" variable is not set at all or set to "false" with the following command: # grep AllowUnauthenticated /etc/apt/apt.conf.d/* /etc/apt/apt.conf.d/01-vendor-Ubuntu:APT::Get::AllowUnauthenticated "false"; If any of the files returned from the command with "AllowUnauthenticated" set to "true", this is a finding.

    Reference:
    https://www.stigviewer.com/stig/canonical_ubuntu_18.04_lts/2023-11-21/finding/V-219155

    Get in touch if you need more help with this issue.

    --please don't forget to "[Accept the answer]" if the reply is helpful--


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.