Thursday, December 3, 2026

What Happened to the last Command in Ubuntu 26.04 LTS?

December 3, 2026 | Linux, Ubuntu Server, System Administration

If you have recently installed or upgraded to Ubuntu 26.04 LTS, you may have noticed that the familiar last command is missing.

For decades, Linux system administrators have used this command to inspect user login history, identify remote connections, investigate suspicious activity, and determine when a server was rebooted.

Fortunately, the functionality has not disappeared. It has been replaced by a more modern implementation called wtmpdb.

Why Was the last Command Replaced?

Traditionally, the last command was provided by the util-linux package and retrieved login and logout information from the binary file:

/var/log/wtmp

One of the limitations of this traditional file format is its vulnerability to the Year 2038 problem, caused by the use of signed 32-bit Unix timestamps.

The new implementation, wtmpdb, addresses this limitation by using an SQLite database and 64-bit timestamps.

The transition offers several benefits:

  • Compatibility with dates beyond January 2038.

  • SQLite-based storage.

  • Modern login and logout tracking.

  • Continued support for familiar command-line options.

  • Integration with Pluggable Authentication Modules (PAM).

Installing wtmpdb on Ubuntu 26.04

The replacement may not be installed by default on your server.

To install it, execute:

sudo apt update
sudo apt install wtmpdb libpam-wtmpdb

The two packages serve different purposes:

PackagePurpose
wtmpdbDisplays login, logout and reboot history.
libpam-wtmpdbRecords user login and logout events through PAM.

Both packages are available in the Ubuntu Universe repository.

If Universe is not enabled, execute:

sudo add-apt-repository universe
sudo apt update

Using the New last Command

The direct replacement for the traditional command is:

wtmpdb last

If the compatibility command is installed, you can continue using:

last

You can verify its availability with:

command -v last

Display the Last 10 Login Records

wtmpdb last -n 10

Display Server Reboot History

wtmpdb last reboot

Display Login History for a Specific User

wtmpdb last username

Display Full Login and Logout Timestamps

wtmpdb last -F

Display IP Addresses Instead of Hostnames

wtmpdb last -i

Display All Available Options

wtmpdb last --help

Where Is Login History Stored?

Instead of using the traditional binary file, wtmpdb uses an SQLite database.

The database location used by the Ubuntu packaging is:

/var/lib/wtmpdb/wtmp.db

The following compatibility path may also be available:

/var/log/wtmp.db

You can inspect these locations using:

ls -l /var/lib/wtmpdb/ /var/log/wtmp*

It is important to understand that installing wtmpdb does not automatically reconstruct all previous login records. Existing historical records may need to be imported separately.

Alternatives Using systemd

If you prefer not to install additional packages, Ubuntu provides several useful alternatives through systemd.

Display System Reboot History

journalctl --list-boots

This command displays the system boots retained in the systemd journal.

Display SSH Login Activity

sudo journalctl -u ssh.service

Display Successful SSH Logins

sudo journalctl -u ssh.service | grep 'Accepted'

Display Failed SSH Password Attempts

sudo journalctl -u ssh.service | grep 'Failed password'

Display SSH Activity for the Current Day

sudo journalctl -u ssh.service --since today

Display Currently Logged-In Users

loginctl list-sessions

Although these commands provide valuable information, they are not exact replacements for the traditional login history database. Their historical coverage depends on journal retention and configuration.

Comparison with Previous Ubuntu LTS Releases

FeatureUbuntu 22.04 / 24.04Ubuntu 26.04
Login history utilitylastwtmpdb last
Packageutil-linuxwtmpdb
Storage formatBinary recordsSQLite
Traditional database/var/log/wtmp/var/lib/wtmpdb/wtmp.db
Year 2038 safeNoYes
Additional installationGenerally unnecessaryMay be required

Recommendations for Production Servers

When deploying a new Ubuntu 26.04 LTS server, consider including the following packages in your standard server provisioning procedure:

sudo apt install wtmpdb libpam-wtmpdb

After installation, establish a new SSH session, disconnect, and verify that the login and logout events have been recorded.

wtmpdb last -n 10

If you maintain shell scripts or automated monitoring tools that depend on the traditional last command, review their compatibility with the new implementation, particularly if they parse its output.

For portability across different Ubuntu releases, scripts can detect which implementation is available:

if command -v wtmpdb >/dev/null 2>&1; then
    wtmpdb last -n 10
elif command -v last >/dev/null 2>&1; then
    last -n 10
else
    echo "No login history utility available." >&2
    exit 1
fi

This approach allows the same script to operate across older and newer Ubuntu servers.

Conclusion

The disappearance of the traditional last command in Ubuntu 26.04 LTS is part of the modernization of Linux login accounting rather than the removal of an important system administration feature.

The wtmpdb package provides a replacement based on SQLite that addresses the Year 2038 problem while preserving much of the familiar command-line functionality.

For system administrators managing Ubuntu 26.04 production servers, installing wtmpdb and its associated PAM module is a straightforward way to maintain access to user login history.

References

Tags: Ubuntu, Ubuntu 26.04 LTS, Linux, System Administration, wtmpdb, last, SSH, Security, Year 2038

Saturday, September 5, 2026

TT Stunnel Changes: Removing Certificate Pinning

 

The following comes from TT System Admin News & Updates for September 4, 2026

 

As of Q2 2026 TT no longer provides / updates the stunnel.zip file which customers might be using to perform certificate pinning. The final certificate in the stunnel.zip file expires on Oct 17, 2026.  

Only customers who download the stunnel.zip file from https://library.tradingtechnologies.com/tt-fix/general/stunnel.zip are impacted. Affected customers should start migrating to utilize their local machine’s certificate trust store. Digicert and AWS are both established Certificate Authorities and should be available in the trust stores of modern operating systems.

 

What This Means 

  • Clients no longer need to download TTFIX.crt file 
  • Clients configure stunnel to use their OS trust store path for CA validation 
  • We verify the correct authentication chain rather than a single pinned leaf certificate 

Configuration Changes 

 

Previous (pinned certificate)

[orfix-tcp]  

client = yes  

accept = 127.0.0.1:11702  

connect = FullyQualifiedDomainName:port  

CAfile = TTFIX.crt  

verify = 3 

 

New (OS trust store with chain validation) 

[orfix-tcp]  

client = yes  

accept = 127.0.0.1:11702  

connect = FullyQualifiedDomainName:port  

verifyChain = yes  

CAfile = <OS_SPECIFIC_TRUST_STORE_PATH> 

 

Notes and Additional Guidance 

  • The snippet above is a single section of the client configuration.  For the other sections please see our online documentation here 
  • Stunnel versions: verifyChain = yes is broadly compatible. If required, verify = 2 provides comparable chain validation. 
  • For clients that currently connect to TT FIX using stunnel, we ask that they come into the UAT to test their needed configuration changes.   

Wednesday, September 2, 2026

Invest numbers / Disturbance identifiers

 

Those codes are invest numbers / disturbance identifiers used by tropical cyclone warning agencies to track systems before—or sometimes after—they become named tropical depressions or storms.

The format is basically:

NN + basin letter

where NN is a sequential number and the final letter identifies the ocean basin.

ExampleMeaningBasin
05LSystem number 05North Atlantic
12ESystem number 12Eastern North Pacific
01WSystem number 01Western North Pacific

The basin letters are the important part:

  • L = North Atlantic, including the Caribbean Sea and Gulf of Mexico
  • E = Eastern North Pacific
  • C = Central North Pacific
  • W = Western North Pacific
  • A / B = North Indian Ocean
  • S / P = Southern Hemisphere basins, depending on location

An important distinction

You might see something like Invest 95L. That is not the fifth tropical cyclone of the year.

Numbers 90–99 are normally reserved for invests—areas of disturbed weather that forecasters are specifically investigating for possible tropical development. The numbers can later be reused.

 

Thursday, August 27, 2026

ss Command Cheatsheet

ss Command Cheatsheet

ss Command Cheatsheet

A fast and powerful tool for dumping socket statistics in Linux

1. The Essential Flags

Flag Meaning What it does
-tTCPShows TCP sockets
-uUDPShows UDP sockets
-lListeningShows only listening sockets (waiting for connections)
-aAllShows all sockets (both listening and established)
-nNumericSkips DNS/port resolution (makes the command run much faster)
-pProcessShows the process ID (PID) and name owning the socket (requires sudo)
-sSummaryPrints a quick summary of overall network statistics
-4 / -6IPv4 / IPv6Forces ss to only show IPv4 or IPv6 connections

2. The "Daily Driver" Commands

  • Show all listening ports and the processes using them:
    sudo ss -tulpn
  • Show all active/established TCP connections:
    ss -atn
  • Show a high-level summary of all network sockets:
    ss -s

3. Filtering by IP and Port

  • Filter by Local Port (Traffic hitting your server):
    ss -tn 'sport = :443'
  • Filter by Remote Port (Traffic leaving your server to a specific port):
    ss -tn 'dport = :3306'
  • Filter by Source IP (Useful if your server has multiple IP addresses):
    ss -tn 'src 10.0.0.5'
  • Filter by Destination IP (Who the server is talking to):
    ss -tn 'dst 192.168.1.50'
  • Combine filters (Connections from a specific IP to port 80):
    ss -tn 'sport = :80 and dst 192.168.1.50'

4. Filtering by TCP State

  • Show only established (active) connections:
    ss -tn state established
  • Show connections stuck in TIME-WAIT:
    ss -tn state time-wait
  • Show connections currently listening:
    ss -tn state listening
(Other valid states include: syn-sent, syn-recv, fin-wait-1, fin-wait-2, close-wait, last-ack, closing, and closed.)

5. Advanced Troubleshooting Options

  • Show socket memory usage (-m):
    ss -tm
    Useful for checking if a specific connection is hogging buffer memory.
  • Show TCP timer information (-o):
    ss -to
    Shows keepalive timers and retransmission states.
  • Show internal TCP metrics (-i):
    ss -ti
    Shows deep kernel-level data like RTT (Round Trip Time), congestion window size (cwnd), and packet pacing.

Sunday, June 7, 2026

Bypassing HTTP: The Fastest Way to Find Your External IP via Command Line

Ever found yourself needing your public IP address while staring at a headless server terminal?

The standard approach for most developers is to ping an external HTTP service using curl or wget. While that works perfectly fine, there is a faster, more elegant way to do it that bypasses the web protocol entirely.

In this post, we’ll look at the traditional web-based methods, unpack a clever DNS-based trick that drastically speeds things up, and show you how to implement it on both Linux and Windows.

The Traditional Way: HTTP Requests

Most of us have these commands permanently burned into our muscle memory:

# The classic curl method
curl ifconfig.me

# Reliable alternatives
curl icanhazip.com
curl api.ipify.org

If you are on a fresh Linux install without curl, you might fall back on wget:

wget -qO- ifconfig.me

The Downside to HTTP

While reliable, these tools require your machine to perform a full TCP handshake, negotiate SSL/TLS encryption certificates, and download a web request. It’s a lot of overhead just to get a single string of numbers back.

The Power-User Alternative: The DNS Trick

If you want maximum speed, you can bypass HTTP entirely and query DNS (Domain Name System).

Because DNS is built on lightweight UDP packets, it doesn’t require the heavy setup of a web connection. It fires a single packet out, and gets a single packet back.

On Ubuntu/Linux, you can leverage Cloudflare's diagnostic tools using the dig command:

dig +short txt ch whoami.cloudflare @1.1.1.1

How Does This Sorcery Work?

Let’s break down exactly what that command is doing:

  • dig: The Domain Information Groper, Linux's native tool for probing DNS servers.
  • +short: Tells dig to suppress its usual verbose network text and only output the answer.
  • txt: Specifies that we are looking for a text record rather than a standard domain mapping (A record).
  • ch: Stands for Chaosnet. While 99% of the web uses the IN (Internet) class, historical network classes like Chaosnet are still used for local server diagnostics.
  • whoami.cloudflare: Cloudflare specifically programmed their servers so that if you ask for the "whoami" record, it reflects your own public IP right back to you.
  • @1.1.1.1: Forces the query directly to Cloudflare's public DNS resolver, bypassing your local router or ISP.

Bringing the Trick to Windows (.bat)

Windows doesn't include dig out of the box, but it does include nslookup, which can achieve the exact same result.

If you want a portable script you can drop onto any Windows machine, here is the complete translation formatted as a standard Windows Batch (.bat) file:

@echo off
REM Check which is your external IP using native Windows tools.

REM Windows native alternative to curl (if needed):
REM powershell -Command "(Invoke-WebRequest ifconfig.me).Content"

REM Using nslookup (Windows native fastest alternative to dig, no HTTP)
REM -query=txt: Requests the raw text record where Cloudflare stores the IP.
REM -class=chaos: Uses the Chaosnet class for diagnostic routing.
REM whoami.cloudflare: The zone designed to reflect your IP back.
REM 1.1.1.1: Forces the query directly to Cloudflare's DNS server.

nslookup -query=txt -class=chaos whoami.cloudflare 1.1.1.1

Wrap Up

The next time you are scripting an automation workflow or debugging a network from the CLI, swap out your curl requests for a DNS lookup. It's lighter on resources, blazing fast, and works even if standard web traffic (ports 80 or 443) is being throttled or blocked on your network.

Thursday, January 8, 2026

Wednesday, December 31, 2025

How to Stop MySQL from Auto-Updating on Ubuntu Server 22.04 (and Verify It Won’t Happen)

If you run MySQL on Ubuntu Server 22.04, you already know the problem:
Ubuntu is very helpful about updates — sometimes too helpful.

An unattended MySQL upgrade can:

  • Restart the service

  • Break replication

  • Introduce subtle behavior changes

  • Ruin a carefully controlled production setup

This post shows how to stop MySQL from auto-updating and how to prove in advance that no update will sneak in.

No hand-waving. Real commands. Verifiable results.


The Real Culprit: Unattended Upgrades

Ubuntu uses a background service called unattended-upgrades to silently install updates. That includes MySQL unless you explicitly stop it.

You have three levels of control. Most servers should use Level 1 or 2.


Option 1 — Freeze MySQL with apt-mark hold (Recommended)

This is the simplest and safest approach.

sudo apt-mark hold mysql-server mysql-client mysql-common

What this does:

  • APT will refuse to upgrade these packages

  • Even if someone runs apt upgrade

  • Even if unattended-upgrades runs overnight

Verify the hold:

apt-mark showhold

Expected output:

mysql-server mysql-client mysql-common

To undo later:

sudo apt-mark unhold mysql-server mysql-client mysql-common

Option 2 — Let Ubuntu Update Everything Except MySQL

If you want security updates for the OS but not for MySQL, blacklist it from unattended upgrades.

Edit the config:

sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Find:

Unattended-Upgrade::Package-Blacklist { };

Add:

Unattended-Upgrade::Package-Blacklist { "mysql-server"; "mysql-client"; "mysql-common"; };

Restart the service:

sudo systemctl restart unattended-upgrades

This keeps the system secure while freezing MySQL.


Option 3 — Disable Automatic Updates Entirely (Use With Caution)

This is a blunt instrument.

sudo systemctl disable --now unattended-upgrades

Or:

sudo nano /etc/apt/apt.conf.d/20auto-upgrades

Set:

APT::Periodic::Unattended-Upgrade "0";

Only do this if you commit to manual patching.


How to Verify Beforehand That MySQL Will NOT Update

This is the part most guides skip. Don’t trust configuration — verify behavior.


1. Check What APT Thinks Is Upgradable

apt list --upgradable | grep -i mysql

Correct result: no output
If you see MySQL packages here, they are not frozen.


2. Simulate a Full Upgrade (Dry Run)

sudo apt -s upgrade | grep -i mysql

The -s flag means simulate only.
Nothing will be installed.

Correct result: no MySQL packages listed.


3. Simulate Unattended Upgrades Directly

This tests the exact logic Ubuntu uses overnight.

sudo unattended-upgrades --dry-run --debug | grep -i mysql

If MySQL is held or blacklisted, it will be skipped.


4. Double-Check Package Holds

apt-mark showhold

If MySQL isn’t listed, it’s not protected.


5. (Optional) Verify Pinning Rules

If you’re using apt pinning:

apt-cache policy mysql-server

You should see a pin priority preventing upgrades.


The “I’m Safe” Checklist

Run these three commands:

apt list --upgradable | grep -i mysql apt -s upgrade | grep -i mysql unattended-upgrades --dry-run --debug | grep -i mysql

If all three return empty, MySQL will not update. Period.


Final Advice

  • Production server? Use apt-mark hold

  • Security-conscious server? Use unattended-upgrade blacklist

  • Never rely on assumptions — always simulate

Ubuntu does exactly what you tell it to do.
The problem is most admins never tell it not to touch MySQL.

My Year with ChatGPT













 

See here: https://chatgpt.com/share/695563c9-a894-800c-ab7e-7ee18881a635 

Another year of walking

I failed again reaching my 1800 miles goal, 150 miles monthly. August was my weakest month.

Let's see on 2026. 

 

SQL Queries

I have written so many SQL queries during my life as a software developer that I lost count.

SQL-Queries is a GitHub repository that I'm going to use for publishing those queries.

This is a work in progress.

 

Java code to create a .XLSX Excel file from a PDF file

I uploaded some Java code that I wrote earlier this year that creates a .XLSX Excel file from PDF file.

GitHub code: https://github.com/64board/account_summary_u 

Excel VBA code to create XLSX file from a CSV file

VBA code to create a XLSX file from a CSV file. It also shows how to auto fit all columns, apply an auto filter to all columns and freeze the first row.

GitHub code: https://github.com/64board/ExcelVBA/blob/master/CreateXLSX.bas

Another interesting idea is to control running code when the workbook is opened using a flag file.

GitHub code: https://github.com/64board/ExcelVBA/blob/master/ThisWorkbook.cls 

Tuesday, December 30, 2025

Python Selenium examples

See below two examples of using Python Selenium:

Chrome version: https://github.com/64board/Python/blob/main/fixing_price_es_chrome.py

Firefox version: https://github.com/64board/Python/blob/main/fixing_price_es_gecko.py  

7-Zip archive Python API

py7zr is a Python module that provides tools to read, write and list 7z file. The 7z file format is a popular archive and compression format in recent days.

See documentation: https://py7zr.readthedocs.io/en/latest/index.html 

I wrote some code demonstrating the API's use: https://github.com/64board/Python/blob/main/py7zr_test.py

Monday, December 29, 2025

Handle of fractions in Perl using BigFloat and the GNU Multiple Precision Library or the Pary library

I just uploaded a program that shows the handling of numerical fractions representation using BigFloat and GNU Multiple Precision Library or the Pary library on the parse_number_fraction procedure.

Github: https://github.com/64board/Perl/blob/main/sto-open-positions-25.pl 

 

Sunday, December 28, 2025

Perl multiple lines REGEX

The code in the the following link illustrates a Perl REGEX written in multiple lines using modifier '/x.'

The `/x` modifier in Perl regular expressions allows you to write more readable patterns by ignoring white space and allowing comments within the regex. This means you can format your regex with spaces and add comments for clarity without affecting its functionality.

Github: https://github.com/64board/Perl/blob/main/get-report-date.pl 

 

Friday, December 26, 2025

Bash program that lists all the years when weekday of your birthday matches your birthday weekday

 

List all years between birthday's year and current one when day of the week matches birthday's day of the week, also lists next year after the last on the list that matches. 

* Uses DATE(1) bash command to do date calculations.

* No other external command required.

Source code: https://github.com/64board/Bash/blob/main/bdates.sh

Python program for calculating office's dates

 mbf_date: A small command-line tool that prints dates based on simple rules.

It can output:

  • the current date
  • the previous date
  • the next date

Optionally, it can treat Saturday and Sunday as non-business days, so:

  • previous business date skips weekends backward
  • next business date skips weekends forward

You can also specify the output format using Python strftime patterns.

Source code:  https://github.com/64board/Python/blob/main/mbf_date.py

 

My First use of ChatGPT

This was my first use of ChatGPT earlier this year: https://chatgpt.com/share/694eca69-8d50-800c-b507-4544ecbd6541

Replacing the seal in a Fluidmaster toilet fill valve is a simple and cost-effective fix if your toilet is running or filling slowly. Here's a step-by-step guide:


🛠️ Tools & Materials Needed:

  • Replacement Fluidmaster seal (usually part #242)

  • Towel or small container (to catch water)

  • Adjustable wrench (optional)


🔧 Step-by-Step Instructions:

1. Turn Off the Water Supply

  • Locate the shut-off valve (usually behind or below the toilet).

  • Turn it clockwise to stop water flow.

2. Flush the Toilet

  • Flush to empty the tank.

  • Hold the handle down to get as much water out as possible.

  • Use a towel or sponge to soak up any remaining water at the bottom of the tank if needed.

3. Remove the Fill Valve Cap

  • The Fluidmaster fill valve cap is usually secured with a twist-lock mechanism.

  • Hold the shaft of the fill valve with one hand.

  • With the other hand, twist the top cap counterclockwise about 1/8 of a turn and lift it off.

  • Some models require gently squeezing side tabs before twisting.

4. Replace the Seal

  • Inside the cap, you’ll see a small rubber seal (usually red or black).

  • Remove the old seal (you can use a small flathead screwdriver or your fingers).

  • Insert the new seal in the same position, making sure it sits flat and centered.

5. Reinstall the Cap

  • Line up the cap on top of the valve body.

  • Twist it clockwise to lock it back into place.

6. Turn the Water Back On

  • Slowly open the shut-off valve.

  • Let the tank fill and check for leaks.

  • Flush the toilet to ensure proper operation.


✅ Tips:

  • The Fluidmaster 400A is the most common model. Make sure you’re using the right seal for your valve.

  • If replacing the seal doesn’t solve the issue, the whole fill valve may need to be replaced (also inexpensive and easy).