Cannot issue APT-GET UPDATE on STIG Ubuntu 18.04

J Wall 20 Reputation points
2024-06-24T16:16:30.8333333+00:00

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.
7,516 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jackson Martins 10,136 Reputation points MVP
    2024-06-24T16:25:34.55+00:00

    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