<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="http://localhost:4000/blog/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/blog/" rel="alternate" type="text/html" /><updated>2026-03-19T10:15:13+01:00</updated><id>http://localhost:4000/blog/feed.xml</id><title type="html">DevOps Chronicles: Solving Everyday Linux Challenges</title><subtitle>Welcome to &quot;DevOps Chronicles&quot; a blog dedicated to sharing my personal experiences and solutions to everyday challenges faced in the world of Linux and DevOps. As a DevOps professional, I encounter various obstacles while working with Linux systems, and this blog aims to provide insights, tips, and solutions to these common issues. Join me on this journey as we explore practical solutions to everyday problems and enhance our Linux skills together.</subtitle><author><name>Krzysztof Tomczyk</name></author><entry><title type="html">Another DNSBL Shuts Down: Farewell to spamtrap.drbl.drand.net</title><link href="http://localhost:4000/blog/linux/2024/03/27/another-dnsbl-shuts-down-farewell-to-spamtrap.drbl.drand.net.html" rel="alternate" type="text/html" title="Another DNSBL Shuts Down: Farewell to spamtrap.drbl.drand.net" /><published>2024-03-27T10:12:31+01:00</published><updated>2024-03-27T10:12:31+01:00</updated><id>http://localhost:4000/blog/linux/2024/03/27/another-dnsbl-shuts-down-farewell-to-spamtrap.drbl.drand.net</id><content type="html" xml:base="http://localhost:4000/blog/linux/2024/03/27/another-dnsbl-shuts-down-farewell-to-spamtrap.drbl.drand.net.html"><![CDATA[<p>If your monitoring system woke you up today with news of your servers blacklisted on a DNSBL, take note. Another DNSBL has disappeared from the Internet scene as of March 26th, 2024.</p>

<p>If you’re using Matteo Corti’s check_rbl monitoring plugin, brace yourself. It appears that all your servers are now flagged on this defunct DNSBL:</p>

<p>“Mail servers appear listed on DNSBL spamtrap.drbl.drand.net”</p>

<p>Time to act. Adjust your monitoring list of DNSBLs checked by modifying the configuration file.</p>

<p>If you find that all your servers are appearing on a particular DNSBL while using Matteo Corti’s check_rbl monitoring plugin, adjustments are necessary to the list of checked DNSBLs. This can be done either by modifying the <code class="language-plaintext highlighter-rouge">-s</code> parameter or by adjusting the configuration (ini) file.</p>

<p>Here’s how to make the necessary changes:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nagios:~<span class="nv">$ </span><span class="nb">grep </span>drand /usr/lib/nagios/plugins/rbl.ini
<span class="nv">server</span><span class="o">=</span>spamtrap.drbl.drand.net
</code></pre></div></div>

<p>To resolve the issue, delete the entry or comment it out using the <code class="language-plaintext highlighter-rouge">#</code> symbol in the configuration file. By doing so, the plugin will cease checking this particular DNSBL.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux" /><category term="Linux" /><category term="Spam" /><category term="Mail" /><summary type="html"><![CDATA[If your monitoring system woke you up today with news of your servers blacklisted on a DNSBL, take note. Another DNSBL has disappeared from the Internet scene as of March 26th, 2024.]]></summary></entry><entry><title type="html">Saving Permissions for Files and Directories</title><link href="http://localhost:4000/blog/linux/2024/03/24/saving-permissions-for-files-and-directories.html" rel="alternate" type="text/html" title="Saving Permissions for Files and Directories" /><published>2024-03-24T03:22:13+01:00</published><updated>2024-03-24T03:22:13+01:00</updated><id>http://localhost:4000/blog/linux/2024/03/24/saving-permissions-for-files-and-directories</id><content type="html" xml:base="http://localhost:4000/blog/linux/2024/03/24/saving-permissions-for-files-and-directories.html"><![CDATA[<p>Archiving permissions for files and directories can often prove to be a valuable practice, especially in scenarios where system configurations or access requirements might change. This process can be accomplished using the <code class="language-plaintext highlighter-rouge">getfacl</code> command, which retrieves the Access Control Lists (ACLs) for specified files or directories. Here’s how you can do it:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># getfacl file_name</span>
</code></pre></div></div>

<p>By executing this command, you obtain the permissions associated with the specified file.</p>

<p>Moreover, if you wish to capture permissions recursively across an entire subdirectory and store the output for future reference, you can utilize the following command:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># getfacl directory &gt; /tmp/files.acl</span>
</code></pre></div></div>

<p>This command not only retrieves permissions for the directory but also for all its subdirectories and files within it, saving the output in a designated file (<code class="language-plaintext highlighter-rouge">/tmp/files.acl</code> in this case).</p>

<p>In cases where it becomes necessary to revert permissions to their previous state, perhaps due to system restoration or accidental modifications, the <code class="language-plaintext highlighter-rouge">setfacl</code> command comes into play. Here’s how you can restore permissions using a previously saved ACL file:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># setfacl --restore=/tmp/files.acl</span>
</code></pre></div></div>

<p>This command applies the permissions specified in the ACL file (<code class="language-plaintext highlighter-rouge">/tmp/files.acl</code>) to the respective files and directories, effectively restoring their previous access settings.</p>

<p>By employing these commands judiciously, system administrators can maintain better control over access permissions, ensuring the security and integrity of critical files and directories within the system.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux" /><category term="Linux" /><category term="Administration" /><summary type="html"><![CDATA[Archiving permissions for files and directories can often prove to be a valuable practice, especially in scenarios where system configurations or access requirements might change. This process can be accomplished using the getfacl command, which retrieves the Access Control Lists (ACLs) for specified files or directories. Here’s how you can do it:]]></summary></entry><entry><title type="html">Practical Approach for OpenVPN CA Certificate Renewal</title><link href="http://localhost:4000/blog/linux,/openvpn,/openssl/2024/03/16/practical-approach-for-openvpn-ca-certificate-renewal.html" rel="alternate" type="text/html" title="Practical Approach for OpenVPN CA Certificate Renewal" /><published>2024-03-16T13:19:04+01:00</published><updated>2024-03-16T13:19:04+01:00</updated><id>http://localhost:4000/blog/linux,/openvpn,/openssl/2024/03/16/practical-approach-for-openvpn-ca-certificate-renewal</id><content type="html" xml:base="http://localhost:4000/blog/linux,/openvpn,/openssl/2024/03/16/practical-approach-for-openvpn-ca-certificate-renewal.html"><![CDATA[<p>If you’re managing an OpenVPN infrastructure and your CA (Certificate Authority) certificate is nearing expiration, a practical approach can help you smoothly transition to a new CA certificate without disruptions. This method is particularly useful for self-signed CA certificates, where maintaining service continuity is essential.</p>

<h3 id="overview">Overview:</h3>

<p>The goal is to generate a new CA certificate with an extended expiration date while retaining the same public key. By doing so, previously issued certificates remain valid, ensuring uninterrupted service. The key steps involve generating a new CA certificate, updating the public certificate on both the server and client sides, and distributing the updated configurations.</p>

<h3 id="steps">Steps:</h3>

<ol>
  <li><strong>Generate New CA Certificate:</strong>
    <ul>
      <li>Using the existing CA key and CSR (Certificate Signing Request), generate a new CA certificate with an extended expiration date.
        <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>openssl ca -keyfile existing_ca_key.pem -in csr.pem -out new_ca_cert.pem -days 3650
</code></pre></div>        </div>
      </li>
    </ul>
  </li>
  <li><strong>Update Server Configuration:</strong>
    <ul>
      <li>Replace the old public certificate in the OpenVPN server configuration with the new one.
        <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Replace 'ca old_ca_cert.pem' with 'ca new_ca_cert.pem' in the server configuration file.
</code></pre></div>        </div>
      </li>
    </ul>
  </li>
  <li><strong>Update Client Configurations:</strong>
    <ul>
      <li>Similarly, replace the old public certificate in the OpenVPN client configurations with the new one.
        <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Replace 'ca old_ca_cert.pem' with 'ca new_ca_cert.pem' in the client configuration file(s).
</code></pre></div>        </div>
      </li>
    </ul>
  </li>
  <li><strong>Distribute Configurations:</strong>
    <ul>
      <li>Distribute the updated server and client configurations to all relevant systems. Ensure that all clients have the latest configurations with the new CA certificate.</li>
    </ul>
  </li>
  <li><strong>Test Connectivity:</strong>
    <ul>
      <li>Thoroughly test connectivity to ensure that the OpenVPN infrastructure is functioning correctly with the new certificates. Verify that clients can connect to the server without any issues.</li>
    </ul>
  </li>
  <li><strong>Monitor for Issues:</strong>
    <ul>
      <li>Monitor the OpenVPN infrastructure closely for any anomalies or issues following the certificate renewal. Address any issues promptly to minimize disruptions.</li>
    </ul>
  </li>
  <li><strong>Implement Certificate Expiry Monitoring:</strong>
    <ul>
      <li>It’s good practice to implement monitoring for certificate expiration to anticipate future renewals. This ensures that you can act well in advance of the CA certificate’s expiration, minimizing the risk of service disruptions. Consider setting up alerts or automated checks to monitor certificate expiry dates.</li>
    </ul>
  </li>
</ol>

<h3 id="benefits">Benefits:</h3>

<ul>
  <li><strong>Smooth Transition:</strong> By retaining the same public key while extending the CA certificate’s expiration date, service disruptions are minimized.</li>
  <li><strong>Simplified Management:</strong> Administrators only need to update the CA certificate, reducing complexity during the transition process.</li>
  <li><strong>Continuous Service:</strong> Clients can seamlessly continue using the OpenVPN service without interruptions or manual intervention. There is no need for clients to reissue their certificates with the new CA, avoiding mass client certificate reissuance.</li>
</ul>

<h3 id="conclusion">Conclusion:</h3>

<p>Renewing an OpenVPN CA certificate doesn’t have to be a daunting task. With a practical approach that preserves the existing public key, you can ensure uninterrupted service while maintaining security. By following these steps, you can smoothly transition to a new CA certificate without disrupting operations. Additionally, implementing certificate expiry monitoring ensures proactive management of future renewals.</p>

<hr />

<p>Feel free to adjust or expand upon this article as needed for your specific audience or context.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux," /><category term="OpenVPN," /><category term="OpenSSL" /><category term="Linux" /><category term="OpenVPN" /><category term="OpenSSL" /><summary type="html"><![CDATA[If you’re managing an OpenVPN infrastructure and your CA (Certificate Authority) certificate is nearing expiration, a practical approach can help you smoothly transition to a new CA certificate without disruptions. This method is particularly useful for self-signed CA certificates, where maintaining service continuity is essential.]]></summary></entry><entry><title type="html">Transitioning Away from MD5 Signed Certificates</title><link href="http://localhost:4000/blog/linux,/security/2024/03/09/transitioning-away-from-md5-signed-certificates.html" rel="alternate" type="text/html" title="Transitioning Away from MD5 Signed Certificates" /><published>2024-03-09T09:11:23+01:00</published><updated>2024-03-09T09:11:23+01:00</updated><id>http://localhost:4000/blog/linux,/security/2024/03/09/transitioning-away-from-md5-signed-certificates</id><content type="html" xml:base="http://localhost:4000/blog/linux,/security/2024/03/09/transitioning-away-from-md5-signed-certificates.html"><![CDATA[<p>Since its discovery of vulnerabilities in 2005, the usage of MD5 as a certificate signing algorithm has been strongly discouraged due to its susceptibility to attacks, posing significant security risks such as data interception and unauthorized access.</p>

<p>Recognizing the urgency to address this issue, we’re taking steps to phase out MD5 support in OpenVPN. However, we understand that transitioning to stronger cryptographic mechanisms may present challenges for some users.</p>

<p>Here’s a condensed version of the transition plan:</p>

<ol>
  <li>
    <p><strong>Awareness</strong>: It’s crucial to recognize if your certificates are using MD5 signatures. You can check this using OpenSSL:</p>

    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> openssl x509 <span class="nt">-in</span> ca.crt <span class="nt">-noout</span> <span class="nt">-text</span> | <span class="nb">grep</span> <span class="s2">"Signature Algorithm"</span>
</code></pre></div>    </div>

    <p>If MD5 is detected, it’s recommended to switch to SHA256 or better.</p>
  </li>
  <li>
    <p><strong>Transitional Period</strong>: We’ve decided to implement a transitional period until May 2018, during which MD5-signed certificates will still function. However, users are strongly encouraged to migrate to stronger alternatives.</p>
  </li>
  <li>
    <p><strong>Workarounds</strong>: If transitioning immediately isn’t feasible, there are temporary workarounds. One option is to adjust the security level in the OpenVPN configuration file (<code class="language-plaintext highlighter-rouge">*.ovpn</code>) on the client side:</p>

    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> tls-cipher <span class="s2">"DEFAULT:@SECLEVEL=0"</span>
</code></pre></div>    </div>

    <p>Note: Setting <code class="language-plaintext highlighter-rouge">SECLEVEL=0</code> allows any algorithm, including MD5. While this is not recommended for long-term security, it can serve as a temporary measure if needed.</p>
  </li>
  <li>
    <p><strong>Support and Resources</strong>: For users facing challenges during the transition, we’re committed to providing support and guidance. Resources such as updated software versions, third-party solutions, and manufacturer support can aid in migrating to secure certificate alternatives.</p>
  </li>
</ol>

<p>By transitioning away from MD5-signed certificates, users can mitigate security risks and ensure the integrity of their data. We’re here to support this process and ensure a smooth transition to stronger cryptographic mechanisms.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux," /><category term="Security" /><category term="Linux" /><category term="Security" /><category term="OpenSSL" /><summary type="html"><![CDATA[Since its discovery of vulnerabilities in 2005, the usage of MD5 as a certificate signing algorithm has been strongly discouraged due to its susceptibility to attacks, posing significant security risks such as data interception and unauthorized access.]]></summary></entry><entry><title type="html">Troubleshooting ORA-01658: Unable to Create INITIAL Extent for Segment in Tablespace</title><link href="http://localhost:4000/blog/linux,/oracle/2024/03/03/troubleshooting-ORA-01658-unable-to-create-initial-extent-for-segment-in-tablespace.html" rel="alternate" type="text/html" title="Troubleshooting ORA-01658: Unable to Create INITIAL Extent for Segment in Tablespace" /><published>2024-03-03T21:23:12+01:00</published><updated>2024-03-03T21:23:12+01:00</updated><id>http://localhost:4000/blog/linux,/oracle/2024/03/03/troubleshooting-ORA-01658-unable-to-create-initial-extent-for-segment-in-tablespace</id><content type="html" xml:base="http://localhost:4000/blog/linux,/oracle/2024/03/03/troubleshooting-ORA-01658-unable-to-create-initial-extent-for-segment-in-tablespace.html"><![CDATA[<p>When encountering the ORA-01658 error in Oracle Database, it signifies a failure to allocate an initial extent for a segment in a specified tablespace. This issue typically arises due to insufficient space or exceeded file size limits within the tablespace. Below is a comprehensive guide to troubleshoot and resolve this error.</p>

<ol>
  <li>
    <p><strong>Identify the Tablespace:</strong>
First, identify the tablespace that needs to be extended. In this case, it’s the “USERS” tablespace.</p>
  </li>
  <li><strong>Check Current Size:</strong>
Before extending, it’s good to check the current size of the datafile associated with the tablespace.
    <div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">SELECT</span> <span class="n">file_name</span><span class="p">,</span> <span class="n">bytes</span> <span class="o">/</span> <span class="mi">1024</span> <span class="o">/</span> <span class="mi">1024</span> <span class="k">AS</span> <span class="n">size_mb</span>
<span class="k">FROM</span> <span class="n">dba_data_files</span>
<span class="k">WHERE</span> <span class="n">tablespace_name</span> <span class="o">=</span> <span class="s1">'USERS'</span><span class="p">;</span>
</code></pre></div>    </div>
  </li>
  <li><strong>Extend the Tablespace:</strong>
You can extend the tablespace by adding another datafile or increasing the size of an existing datafile. Here’s how to increase the size of an existing datafile:
    <div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">ALTER</span> <span class="k">DATABASE</span> <span class="n">DATAFILE</span> <span class="s1">'/path/to/users01.dbf'</span> <span class="n">RESIZE</span> <span class="mi">500</span><span class="n">M</span><span class="p">;</span>
</code></pre></div>    </div>
    <p>This command increases the size of the datafile named ‘users01.dbf’ to 500MB. Adjust the size according to your requirements.</p>
  </li>
  <li><strong>Verify Extension:</strong>
After executing the above command, verify if the datafile size has been extended successfully:
    <div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">SELECT</span> <span class="n">file_name</span><span class="p">,</span> <span class="n">bytes</span> <span class="o">/</span> <span class="mi">1024</span> <span class="o">/</span> <span class="mi">1024</span> <span class="k">AS</span> <span class="n">size_mb</span>
<span class="k">FROM</span> <span class="n">dba_data_files</span>
<span class="k">WHERE</span> <span class="n">tablespace_name</span> <span class="o">=</span> <span class="s1">'USERS'</span><span class="p">;</span>
</code></pre></div>    </div>
  </li>
  <li><strong>Check Tablespace Usage:</strong>
Monitor the tablespace usage to ensure that the extension has resolved the space issue:
    <div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">SELECT</span> <span class="n">tablespace_name</span><span class="p">,</span>
       <span class="k">SUM</span><span class="p">(</span><span class="n">bytes</span><span class="p">)</span> <span class="o">/</span> <span class="mi">1024</span> <span class="o">/</span> <span class="mi">1024</span> <span class="k">AS</span> <span class="n">total_space_mb</span><span class="p">,</span>
       <span class="k">SUM</span><span class="p">(</span><span class="n">bytes</span> <span class="o">-</span> <span class="n">NVL</span><span class="p">(</span><span class="n">free_space</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span> <span class="o">/</span> <span class="mi">1024</span> <span class="o">/</span> <span class="mi">1024</span> <span class="k">AS</span> <span class="n">used_space_mb</span><span class="p">,</span>
       <span class="k">SUM</span><span class="p">(</span><span class="n">NVL</span><span class="p">(</span><span class="n">free_space</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span> <span class="o">/</span> <span class="mi">1024</span> <span class="o">/</span> <span class="mi">1024</span> <span class="k">AS</span> <span class="n">free_space_mb</span>
<span class="k">FROM</span> <span class="n">dba_data_files</span>
<span class="k">JOIN</span> <span class="p">(</span><span class="k">SELECT</span> <span class="n">file_id</span><span class="p">,</span> <span class="k">SUM</span><span class="p">(</span><span class="n">bytes</span><span class="p">)</span> <span class="n">free_space</span>
      <span class="k">FROM</span> <span class="n">dba_free_space</span>
      <span class="k">GROUP</span> <span class="k">BY</span> <span class="n">file_id</span><span class="p">)</span> <span class="k">ON</span> <span class="n">file_id</span> <span class="o">=</span> <span class="n">file_id</span>
<span class="k">WHERE</span> <span class="n">tablespace_name</span> <span class="o">=</span> <span class="s1">'USERS'</span>
<span class="k">GROUP</span> <span class="k">BY</span> <span class="n">tablespace_name</span><span class="p">;</span>
</code></pre></div>    </div>
  </li>
</ol>

<p>By following these steps, you can extend a tablespace in Oracle Database, addressing the ORA-01658 error and ensuring sufficient space for your database objects. Adjust the commands and sizes according to your specific requirements and environment.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux," /><category term="Oracle" /><category term="ORA Errors" /><category term="Oracle" /><category term="ORA-" /><summary type="html"><![CDATA[When encountering the ORA-01658 error in Oracle Database, it signifies a failure to allocate an initial extent for a segment in a specified tablespace. This issue typically arises due to insufficient space or exceeded file size limits within the tablespace. Below is a comprehensive guide to troubleshoot and resolve this error.]]></summary></entry><entry><title type="html">Exploring the Lesser-Known Command: lastb</title><link href="http://localhost:4000/blog/linux,/security/2024/02/29/exploring-the-lesser-known-command-lastb.html" rel="alternate" type="text/html" title="Exploring the Lesser-Known Command: lastb" /><published>2024-02-29T21:38:11+01:00</published><updated>2024-02-29T21:38:11+01:00</updated><id>http://localhost:4000/blog/linux,/security/2024/02/29/exploring-the-lesser-known-command-lastb</id><content type="html" xml:base="http://localhost:4000/blog/linux,/security/2024/02/29/exploring-the-lesser-known-command-lastb.html"><![CDATA[<p>In the realm of Unix-like operating systems, particularly Linux, there exists a wealth of commands that cater to various administrative needs, ranging from managing processes to tracking user activity. Among these commands, two often overlooked yet powerful tools are <code class="language-plaintext highlighter-rouge">last</code> and <code class="language-plaintext highlighter-rouge">lastb</code>. While both serve the purpose of displaying login records, they differ significantly in their scope and application.</p>

<p><strong>Understanding last:</strong></p>

<p><code class="language-plaintext highlighter-rouge">last</code> is a command-line utility that displays a list of last logged in users. It extracts information from the <code class="language-plaintext highlighter-rouge">/var/log/wtmp</code> file, which stores all the login and logout records of users. The typical output of the <code class="language-plaintext highlighter-rouge">last</code> command includes the username, terminal, IP address, login time, and logout time (if available). It is an invaluable tool for system administrators to track user activities, audit logins, and diagnose security breaches.</p>

<p>Usage example:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ last
</code></pre></div></div>

<p><strong>Introducing lastb:</strong></p>

<p>On the other hand, <code class="language-plaintext highlighter-rouge">lastb</code> is a command that is less familiar to many users compared to <code class="language-plaintext highlighter-rouge">last</code>. The ‘b’ in <code class="language-plaintext highlighter-rouge">lastb</code> stands for “bad”, indicating its primary use case: tracking failed login attempts. While <code class="language-plaintext highlighter-rouge">last</code> reads from <code class="language-plaintext highlighter-rouge">/var/log/wtmp</code>, <code class="language-plaintext highlighter-rouge">lastb</code> reads from <code class="language-plaintext highlighter-rouge">/var/log/btmp</code>, which specifically logs failed login attempts.</p>

<p>Usage example:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ lastb
</code></pre></div></div>

<p><strong>Differentiating Features:</strong></p>

<ol>
  <li><strong>Data Focus:</strong>
    <ul>
      <li><code class="language-plaintext highlighter-rouge">last</code> focuses on successful logins and provides a comprehensive record of user activity.</li>
      <li><code class="language-plaintext highlighter-rouge">lastb</code>, however, zeroes in on failed login attempts, making it particularly useful for security analysis and intrusion detection.</li>
    </ul>
  </li>
  <li><strong>Security Implications:</strong>
    <ul>
      <li>Monitoring <code class="language-plaintext highlighter-rouge">lastb</code> can help administrators identify potential security threats by pinpointing repeated failed login attempts, which may signify brute-force attacks or unauthorized access attempts.</li>
      <li><code class="language-plaintext highlighter-rouge">last</code>, while still crucial for auditing user behavior, may not highlight failed login attempts with the same immediacy as <code class="language-plaintext highlighter-rouge">lastb</code>.</li>
    </ul>
  </li>
  <li><strong>File Sources:</strong>
    <ul>
      <li><code class="language-plaintext highlighter-rouge">last</code> retrieves data from the <code class="language-plaintext highlighter-rouge">/var/log/wtmp</code> file.</li>
      <li><code class="language-plaintext highlighter-rouge">lastb</code> retrieves data from the <code class="language-plaintext highlighter-rouge">/var/log/btmp</code> file.</li>
    </ul>
  </li>
</ol>

<p><strong>Best Practices:</strong></p>

<ul>
  <li>Regularly check both <code class="language-plaintext highlighter-rouge">last</code> and <code class="language-plaintext highlighter-rouge">lastb</code> logs to maintain a holistic view of user activity on your system.</li>
  <li>Implement automated monitoring systems that parse these logs for anomalies and trigger alerts for suspicious activities.</li>
  <li>Consider integrating these commands into your security protocols to fortify your system against unauthorized access attempts.</li>
</ul>

<p><strong>Conclusion:</strong></p>

<p>While <code class="language-plaintext highlighter-rouge">last</code> may enjoy more recognition among system administrators for its role in tracking user logins, <code class="language-plaintext highlighter-rouge">lastb</code> is equally essential, if not more so, for its ability to highlight failed login attempts and potential security threats. By leveraging both commands in tandem, administrators can gain comprehensive insights into user activities and fortify their systems against security breaches. In the realm of cybersecurity, knowledge and utilization of tools like <code class="language-plaintext highlighter-rouge">lastb</code> can make all the difference between a secure system and a compromised one.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux," /><category term="Security" /><category term="Linux" /><category term="Security" /><summary type="html"><![CDATA[In the realm of Unix-like operating systems, particularly Linux, there exists a wealth of commands that cater to various administrative needs, ranging from managing processes to tracking user activity. Among these commands, two often overlooked yet powerful tools are last and lastb. While both serve the purpose of displaying login records, they differ significantly in their scope and application.]]></summary></entry><entry><title type="html">Managing Disk Space Limitations in Oracle: Extending DB_RECOVERY_FILE_DEST_SIZE</title><link href="http://localhost:4000/blog/linux,/oracle/2024/02/22/managing-disk-space-limitations-in-oracle-extending-DB_RECOVERY_FILE_DEST_SIZE.html" rel="alternate" type="text/html" title="Managing Disk Space Limitations in Oracle: Extending DB_RECOVERY_FILE_DEST_SIZE" /><published>2024-02-22T12:42:04+01:00</published><updated>2024-02-22T12:42:04+01:00</updated><id>http://localhost:4000/blog/linux,/oracle/2024/02/22/managing-disk-space-limitations-in-oracle-extending-DB_RECOVERY_FILE_DEST_SIZE</id><content type="html" xml:base="http://localhost:4000/blog/linux,/oracle/2024/02/22/managing-disk-space-limitations-in-oracle-extending-DB_RECOVERY_FILE_DEST_SIZE.html"><![CDATA[<p>In the realm of Oracle database management, encountering limitations on disk space allocation is not uncommon. One specific error that may arise due to such constraints is the ORA-19804 error, indicating Oracle’s inability to reclaim a specified amount of disk space from the <code class="language-plaintext highlighter-rouge">DB_RECOVERY_FILE_DEST_SIZE</code> limit. This error can impede critical backup and recovery operations, necessitating swift resolution.</p>

<p><strong>Understanding DB_RECOVERY_FILE_DEST_SIZE:</strong></p>

<p><code class="language-plaintext highlighter-rouge">DB_RECOVERY_FILE_DEST_SIZE</code> is a crucial parameter in Oracle databases that determines the maximum size limit for the Fast Recovery Area (FRA). The FRA serves as a repository for backup-related files, including RMAN backups, archived redo logs, and flashback logs. When the FRA approaches its defined size limit, Oracle attempts to reclaim disk space to accommodate new backups and logs.</p>

<p><strong>Resolving ORA-19804 by Extending DB_RECOVERY_FILE_DEST_SIZE:</strong></p>

<p>To address the ORA-19804 error and mitigate disk space constraints, extending the <code class="language-plaintext highlighter-rouge">DB_RECOVERY_FILE_DEST_SIZE</code> parameter is imperative. This process involves adjusting the parameter value to allocate additional disk space for the FRA, thereby enabling Oracle to reclaim the necessary space during backup operations.</p>

<p><strong>Example Command to Extend DB_RECOVERY_FILE_DEST_SIZE:</strong></p>

<p>To extend the <code class="language-plaintext highlighter-rouge">DB_RECOVERY_FILE_DEST_SIZE</code> parameter, execute the following SQL command in Oracle:</p>

<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">ALTER</span> <span class="k">SYSTEM</span> <span class="k">SET</span> <span class="n">DB_RECOVERY_FILE_DEST_SIZE</span> <span class="o">=</span> <span class="o">&lt;</span><span class="n">new_size</span><span class="o">&gt;</span> <span class="p">[</span><span class="k">G</span><span class="o">|</span><span class="n">M</span><span class="p">];</span>
</code></pre></div></div>

<p>Replace <code class="language-plaintext highlighter-rouge">&lt;new_size&gt;</code> with the desired size for the FRA extension. You can specify the size in gigabytes (G) or megabytes (M), depending on your requirements.</p>

<p><strong>Considerations:</strong></p>

<ul>
  <li>
    <p><strong>Disk Availability:</strong> Ensure that sufficient disk space is available on the filesystem where the FRA resides before extending <code class="language-plaintext highlighter-rouge">DB_RECOVERY_FILE_DEST_SIZE</code>.</p>
  </li>
  <li>
    <p><strong>Impact of Changes:</strong> Assess the potential impact of extending the FRA size on disk usage and system performance.</p>
  </li>
  <li>
    <p><strong>Monitoring:</strong> Regularly monitor the FRA usage and adjust the <code class="language-plaintext highlighter-rouge">DB_RECOVERY_FILE_DEST_SIZE</code> parameter as needed to prevent future disk space constraints.</p>
  </li>
</ul>

<p><strong>Conclusion:</strong></p>

<p>Extending the <code class="language-plaintext highlighter-rouge">DB_RECOVERY_FILE_DEST_SIZE</code> parameter is a fundamental step in resolving the ORA-19804 error and addressing disk space limitations in Oracle databases. By allocating additional space to the Fast Recovery Area, administrators can ensure uninterrupted backup and recovery operations, safeguarding the integrity and availability of critical data.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux," /><category term="Oracle" /><category term="Linux" /><category term="ORA errors" /><category term="Oracle" /><summary type="html"><![CDATA[In the realm of Oracle database management, encountering limitations on disk space allocation is not uncommon. One specific error that may arise due to such constraints is the ORA-19804 error, indicating Oracle’s inability to reclaim a specified amount of disk space from the DB_RECOVERY_FILE_DEST_SIZE limit. This error can impede critical backup and recovery operations, necessitating swift resolution.]]></summary></entry><entry><title type="html">Discovering Linux Kernel Parameters for the Current Booted System</title><link href="http://localhost:4000/blog/linux/2023/07/06/discovering-linux-kernel-parameters-for-the-current-booted-system.html" rel="alternate" type="text/html" title="Discovering Linux Kernel Parameters for the Current Booted System" /><published>2023-07-06T22:05:14+02:00</published><updated>2023-07-06T22:05:14+02:00</updated><id>http://localhost:4000/blog/linux/2023/07/06/discovering-linux-kernel-parameters-for-the-current-booted-system</id><content type="html" xml:base="http://localhost:4000/blog/linux/2023/07/06/discovering-linux-kernel-parameters-for-the-current-booted-system.html"><![CDATA[<p>Linux administrators often need to retrieve information about the kernel parameters of their system to troubleshoot issues, optimize performance, or understand the system’s behavior. This article will guide midlevel administrators through the process of retrieving Linux kernel parameters, providing embedded examples and explanations to help them gain a better understanding of their system’s configuration.</p>

<ol>
  <li>Using the /proc filesystem:
The Linux kernel exposes various system information, including kernel parameters, through the /proc filesystem. The /proc/sys directory contains a hierarchical structure of files and directories that represent different kernel parameters and their values.</li>
</ol>

<p>To retrieve a kernel parameter, you can navigate to the corresponding file using the <code class="language-plaintext highlighter-rouge">cat</code> command. For example, to retrieve the value of the “max_map_count” parameter, execute the following command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cat /proc/sys/vm/max_map_count
</code></pre></div></div>

<p>This will display the current value of the parameter.</p>

<ol>
  <li>Using the sysctl command:
The sysctl command provides a convenient way to retrieve and modify kernel parameters. It reads and writes values directly to the /proc/sys virtual filesystem, simplifying the process for administrators.</li>
</ol>

<p>To retrieve a kernel parameter using sysctl, use the <code class="language-plaintext highlighter-rouge">-n</code> option followed by the parameter’s name. For instance, to retrieve the value of the “net.ipv4.ip_forward” parameter, execute:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sysctl -n net.ipv4.ip_forward
</code></pre></div></div>

<p>The command will display the current value of the parameter.</p>

<ol>
  <li>Listing all kernel parameters:
Sometimes, you may want to view a comprehensive list of available kernel parameters. You can achieve this by executing the following command:</li>
</ol>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sysctl -a
</code></pre></div></div>

<p>This command will display a list of all kernel parameters and their current values, providing a wealth of information about your system’s configuration.</p>

<ol>
  <li>Retrieving kernel parameters from boot-time configuration:
Linux systems typically load kernel parameters during the boot process. To retrieve these parameters, you can examine the contents of the <code class="language-plaintext highlighter-rouge">/proc/cmdline</code> file. This file contains the command-line arguments passed to the kernel during boot.</li>
</ol>

<p>To view the contents of the file, use the <code class="language-plaintext highlighter-rouge">cat</code> command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cat /proc/cmdline
</code></pre></div></div>

<p>This will display the boot-time kernel parameters, such as boot options, root device, and other relevant information.</p>

<ol>
  <li>Using the dmesg command:
The dmesg command displays the kernel ring buffer, which contains various system messages, including boot-time kernel parameters. By filtering the output, you can retrieve specific kernel parameters.</li>
</ol>

<p>To retrieve kernel parameters from the dmesg output, use the <code class="language-plaintext highlighter-rouge">grep</code> command along with a keyword related to the parameter you are interested in. For example, to find parameters related to the network interface, execute:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dmesg | grep -i network
</code></pre></div></div>

<p>This command will display the relevant kernel messages containing network-related parameters.</p>

<p>Conclusion:
Retrieving Linux kernel parameters is essential for midlevel administrators to understand their system’s configuration and troubleshoot issues effectively. By utilizing the /proc filesystem, sysctl command, examining boot-time configuration, and leveraging the dmesg command, administrators can retrieve valuable information about their system’s kernel parameters. Understanding these parameters enables administrators to optimize performance, diagnose problems, and make informed decisions to maintain a stable and efficient Linux environment.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux" /><category term="Linux" /><category term="kernel parameters" /><category term="kernel" /><summary type="html"><![CDATA[Linux administrators often need to retrieve information about the kernel parameters of their system to troubleshoot issues, optimize performance, or understand the system’s behavior. This article will guide midlevel administrators through the process of retrieving Linux kernel parameters, providing embedded examples and explanations to help them gain a better understanding of their system’s configuration.]]></summary></entry><entry><title type="html">How to Retrieve Linux Kernel Parameters for the Current System Configuration</title><link href="http://localhost:4000/blog/linux/2023/07/05/how-to-retrieve-linux-kernel-parameters-for-the-current-system-configuration.html" rel="alternate" type="text/html" title="How to Retrieve Linux Kernel Parameters for the Current System Configuration" /><published>2023-07-05T12:14:33+02:00</published><updated>2023-07-05T12:14:33+02:00</updated><id>http://localhost:4000/blog/linux/2023/07/05/how-to-retrieve-linux-kernel-parameters-for-the-current-system-configuration</id><content type="html" xml:base="http://localhost:4000/blog/linux/2023/07/05/how-to-retrieve-linux-kernel-parameters-for-the-current-system-configuration.html"><![CDATA[<p>Linux administrators often need to retrieve information about the kernel parameters of their system to troubleshoot issues, optimize performance, or understand the system’s behavior. This article will guide midlevel administrators through the process of retrieving Linux kernel parameters, providing embedded examples and explanations to help them gain a better understanding of their system’s configuration.</p>

<ol>
  <li>Using the /proc filesystem:
The Linux kernel exposes various system information, including kernel parameters, through the /proc filesystem. The /proc/sys directory contains a hierarchical structure of files and directories that represent different kernel parameters and their values.</li>
</ol>

<p>To retrieve a kernel parameter, you can navigate to the corresponding file using the <code class="language-plaintext highlighter-rouge">cat</code> command. For example, to retrieve the value of the “max_map_count” parameter, execute the following command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cat /proc/sys/vm/max_map_count
</code></pre></div></div>

<p>This will display the current value of the parameter.</p>

<ol>
  <li>Using the sysctl command:
The sysctl command provides a convenient way to retrieve and modify kernel parameters. It reads and writes values directly to the /proc/sys virtual filesystem, simplifying the process for administrators.</li>
</ol>

<p>To retrieve a kernel parameter using sysctl, use the <code class="language-plaintext highlighter-rouge">-n</code> option followed by the parameter’s name. For instance, to retrieve the value of the “net.ipv4.ip_forward” parameter, execute:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sysctl -n net.ipv4.ip_forward
</code></pre></div></div>

<p>The command will display the current value of the parameter.</p>

<ol>
  <li>Listing all kernel parameters:
Sometimes, you may want to view a comprehensive list of available kernel parameters. You can achieve this by executing the following command:</li>
</ol>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sysctl -a
</code></pre></div></div>

<p>This command will display a list of all kernel parameters and their current values, providing a wealth of information about your system’s configuration.</p>

<ol>
  <li>Retrieving kernel parameters from boot-time configuration:
Linux systems typically load kernel parameters during the boot process. To retrieve these parameters, you can examine the contents of the <code class="language-plaintext highlighter-rouge">/proc/cmdline</code> file. This file contains the command-line arguments passed to the kernel during boot.</li>
</ol>

<p>To view the contents of the file, use the <code class="language-plaintext highlighter-rouge">cat</code> command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cat /proc/cmdline
</code></pre></div></div>

<p>This will display the boot-time kernel parameters, such as boot options, root device, and other relevant information.</p>

<ol>
  <li>Using the dmesg command:
The dmesg command displays the kernel ring buffer, which contains various system messages, including boot-time kernel parameters. By filtering the output, you can retrieve specific kernel parameters.</li>
</ol>

<p>To retrieve kernel parameters from the dmesg output, use the <code class="language-plaintext highlighter-rouge">grep</code> command along with a keyword related to the parameter you are interested in. For example, to find parameters related to the network interface, execute:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dmesg | grep -i network
</code></pre></div></div>

<p>This command will display the relevant kernel messages containing network-related parameters.</p>

<p>Conclusion:
Retrieving Linux kernel parameters is essential for midlevel administrators to understand their system’s configuration and troubleshoot issues effectively. By utilizing the /proc filesystem, sysctl command, examining boot-time configuration, and leveraging the dmesg command, administrators can retrieve valuable information about their system’s kernel parameters. Understanding these parameters enables administrators to optimize performance, diagnose problems, and make informed decisions to maintain a stable and efficient Linux environment.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux" /><category term="Linux" /><category term="kernel parameters" /><category term="kernel" /><summary type="html"><![CDATA[Linux administrators often need to retrieve information about the kernel parameters of their system to troubleshoot issues, optimize performance, or understand the system’s behavior. This article will guide midlevel administrators through the process of retrieving Linux kernel parameters, providing embedded examples and explanations to help them gain a better understanding of their system’s configuration.]]></summary></entry><entry><title type="html">Linux Command History: An Introduction</title><link href="http://localhost:4000/blog/linux/2023/07/04/linux-command-history-an-introduction.html" rel="alternate" type="text/html" title="Linux Command History: An Introduction" /><published>2023-07-04T23:33:12+02:00</published><updated>2023-07-04T23:33:12+02:00</updated><id>http://localhost:4000/blog/linux/2023/07/04/linux-command-history-an-introduction</id><content type="html" xml:base="http://localhost:4000/blog/linux/2023/07/04/linux-command-history-an-introduction.html"><![CDATA[<p>In the vast realm of Linux, mastering the command line is a valuable skill that empowers users to navigate, control, and customize their systems with precision. One often overlooked yet immensely useful feature at your disposal is the command history. Imagine having the ability to effortlessly recall and re-execute previously used commands, saving you time and effort. This is where the command history becomes your trusted companion.</p>

<p>In this article, we will delve into the fascinating world of Linux command history. We will explore how you can leverage this powerful tool to streamline your workflow, improve productivity, and gain a deeper understanding of your command line interactions. Whether you’re a Linux newcomer or an experienced user looking to enhance your efficiency, this guide will provide you with the knowledge and techniques to make the most of command history.</p>

<p>Running commands from history:</p>

<p>To display command history, type ‘history’ and press Enter. It will show numbered commands from the history.
To run a specific command from history, type ‘!nr’, where ‘nr’ is the command number in history. For example, if you want to run command number 42, type ‘!42’ and press Enter.
Environment variables and history formatting:</p>

<p>To add date and time to command history, you can set the environment variable ‘HISTTIMEFORMAT’. For example, in the terminal, type:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export HISTTIMEFORMAT="%F %T "
</code></pre></div></div>
<p>The above format ‘%F %T’ represents date and time in ISO 8601 format.
After applying this change, new commands will include date and time information in the history.
Formatting history:</p>

<p>Command history can be formatted using options of the ‘history’ command. Here are a few examples:
‘history -c’: Clear command history.
‘history -d nr’: Delete the command with the specified number ‘nr’ from history.
‘history -a’: Save the current state of history to the file ‘~/.bash_history’.
You can find more options by typing ‘man history’ in the terminal.
Synchronizing history between sessions:</p>

<p>Command history is typically saved in the ‘~/.bash_history’ file for most shells.
To synchronize history between sessions, follow these steps:
After executing important commands, type ‘history -a’ to save the current state of history to the ‘~/.bash_history’ file.
To load history from the ‘~/.bash_history’ file in a new session, type ‘history -r’.
Examples:</p>

<p>Displaying command history:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>history
</code></pre></div></div>
<p>Running a command from history:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>!42
</code></pre></div></div>
<p>Setting the HISTTIMEFORMAT environment variable:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export HISTTIMEFORMAT="%F %T "
</code></pre></div></div>
<p>Formatting history:
Clearing command history:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>history -c
</code></pre></div></div>
<p>Deleting command number 15 from history:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>history -d 15
</code></pre></div></div>
<p>Saving the current state of history to the file ‘~/.bash_history’:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>history -a
</code></pre></div></div>
<p>Please note that the examples assume the usage of the Bash shell.</p>]]></content><author><name>Krzysztof Tomczyk</name></author><category term="Linux" /><category term="Linux" /><category term="command history" /><summary type="html"><![CDATA[In the vast realm of Linux, mastering the command line is a valuable skill that empowers users to navigate, control, and customize their systems with precision. One often overlooked yet immensely useful feature at your disposal is the command history. Imagine having the ability to effortlessly recall and re-execute previously used commands, saving you time and effort. This is where the command history becomes your trusted companion.]]></summary></entry></feed>