avatarTeri Radichel

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2336

Abstract

he root drive. I found some interesting files in the /tmp directory — one referencing SSH which I don’t use, so I deleted it.</p><div id="0689"><pre>sudo <span class="hljs-built_in">ls</span> /tmp</pre></div><p id="89eb">Another directory started with snap or .snap. I took my changes and deleted that as well. I moved some files I had downloaded to my other drive.</p><p id="9b5a">Then I tried to follow the process again and it didn’t work. I had to run the following:</p><div id="7e9c"><pre>sudo apt <span class="hljs-comment">--fix-broken install</span></pre></div><p id="aa75">That is likely due to the disk space issue which prevented from files from installing:</p><div id="dbf1"><pre><span class="hljs-attribute">The</span> following packages have unmet dependencies: <span class="hljs-attribute">linux</span>-headers-<span class="hljs-number">5</span>.<span class="hljs-number">19</span>.<span class="hljs-number">0</span>-<span class="hljs-number">1027</span>-aws : Depends: linux-aws-<span class="hljs-number">5</span>.<span class="hljs-number">19</span>-headers-<span class="hljs-number">5</span>.<span class="hljs-number">19</span>.<span class="hljs-number">0</span>-<span class="hljs-number">1027</span> but it is not installed <span class="hljs-attribute">E</span>: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).</pre></div><p id="43bd">Along the way I got an error message that the AWS version (kernel? I can’t find the error now as I think it was in a pop up dialog) was not the correct version. It looked like it was a version behind. The system was rebooting. OK. It didn’t really give me any other options. Glad I wasn’t running anything important that could not be interrupted. A warning in advance would be great.</p><p id="c018">After doing all that and update and upgrade seem to be happy again.</p><p id="b750">Unfortunately it did not fix this error with code that used to work before. The AWS CLI Profile works, but not when I use it with the Boto3 client. The profile requires MFA and an external ID. It used to work. Still trying to resolve it.</p><div id="93c2"><pre> File "/home/ubuntu/.local/lib/python3.10/site-packages/botocore/client.py", <span class="hljs-type">line</span> <span class="hljs-number">530</span>, <span class="hljs-keyword">in</span> _api

Options

_call <span class="hljs-keyword">return</span> self._make_api_call(operation_name, kwargs) File "/home/ubuntu/.local/lib/python3.10/site-packages/botocore/client.py", <span class="hljs-type">line</span> <span class="hljs-number">964</span>, <span class="hljs-keyword">in</span> _make_api_call <span class="hljs-keyword">raise</span> error_class(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (UnauthorizedOperation) <span class="hljs-keyword">when</span> calling the DescribeNetworkInterfaces operation: You are <span class="hljs-keyword">not</span> authorized <span class="hljs-keyword">to</span> <span class="hljs-keyword">perform</span> this operation.</pre></div><p id="86c8">Follow for updates.</p><p id="4a3a">Teri Radichel | <i>© <a href="https://2ndsightlab.com/?source=post_page---------------------------">2nd Sight Lab</a> 2023</i></p><div id="8b5f"><pre><span class="hljs-section">About Teri Radichel:

⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab</pre></div><div id="caae"><pre><span class="hljs-section">Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span>
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation</pre></div><div id="cb01"><pre>Follow <span class="hljs-keyword">for</span> more stories like <span class="hljs-keyword">this</span>:

❤️ Sign Up my Medium Email List ❤️ Twitter: <span class="hljs-meta">@teriradichel</span> ❤️ LinkedIn: https:<span class="hljs-comment">//www.linkedin.com/in/teriradichel</span> ❤️ Mastodon: <span class="hljs-meta">@teriradichel</span><span class="hljs-meta">@infosec</span>.exchange ❤️ Facebook: 2nd Sight Lab ❤️ YouTube: @2ndsightlab</pre></div><figure id="7286"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4oxP4LXk8l8c3mpRvO7ejg.png"><figcaption></figcaption></figure></article></body>

Issues Updating and Upgrading on Ubuntu EC2

Random issues and how to fix

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

⚙️ Check out my series on Automating Cybersecurity Metrics | Code.

🔒 Related Stories: Bugs | AWS Security | Network Security

💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I already wrote about how I was trying to troubleshoot an issue which magically was no longer an issue today.

After that issue seemed to magically fix itself I started wondering how my system got updated and if there were any new updates. Today I tried to apt-get update and upgrade my Ubuntu EC2 instance.

sudo apt-get update
sudo apt-get upgrade

When I tried I got an error that the system was out of disk space on the root drive which I didn’t get the time I ran update and upgrade. Odd.

So I started searching around for things I could delete off the root drive. I found some interesting files in the /tmp directory — one referencing SSH which I don’t use, so I deleted it.

sudo ls /tmp

Another directory started with snap or .snap. I took my changes and deleted that as well. I moved some files I had downloaded to my other drive.

Then I tried to follow the process again and it didn’t work. I had to run the following:

sudo apt --fix-broken install

That is likely due to the disk space issue which prevented from files from installing:

The following packages have unmet dependencies:
 linux-headers-5.19.0-1027-aws : Depends: linux-aws-5.19-headers-5.19.0-1027 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Along the way I got an error message that the AWS version (kernel? I can’t find the error now as I think it was in a pop up dialog) was not the correct version. It looked like it was a version behind. The system was rebooting. OK. It didn’t really give me any other options. Glad I wasn’t running anything important that could not be interrupted. A warning in advance would be great.

After doing all that and update and upgrade seem to be happy again.

Unfortunately it did not fix this error with code that used to work before. The AWS CLI Profile works, but not when I use it with the Boto3 client. The profile requires MFA and an external ID. It used to work. Still trying to resolve it.

  File "/home/ubuntu/.local/lib/python3.10/site-packages/botocore/client.py", line 530, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/botocore/client.py", line 964, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (UnauthorizedOperation) when calling the DescribeNetworkInterfaces operation: You are not authorized to perform this operation.

Follow for updates.

Teri Radichel | © 2nd Sight Lab 2023

About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
Error Message
Aw
Ubunto
Upgrade
Update
Recommended from ReadMedium