All posts

Quick Tip: Disable the Password Dots in sudo (Ubuntu 26.04 / sudo-rs)

August 26, 2026Michał Woliński2 min read
Quick Tip: Disable the Password Dots in sudo (Ubuntu 26.04 / sudo-rs)

On Ubuntu 25.10 and 26.04 (and their derivatives) the sudo password prompt suddenly echoes a * per keystroke. It's not a bug — it's a deliberate UX change in the new memory-safe sudo implementation, sudo-rs. If you prefer the classic, silent password entry (and not leaking its length), one flag in sudoers turns it off.

The Fix

Open the sudoers file with the safe editor:

sudo visudo

visudo opens the default editor — on many server installs that is vi/vim, not nano. If you land in a modal editor and are unsure, you can force nano explicitly:

sudo EDITOR=nano visudo

Add this line alongside the other Defaults near the top of the file:

Defaults !pwfeedback

In nano, save and exit with Ctrl+O then Ctrl+X. In vi/vim: press Esc, then type :wq and press Enter.

Force a fresh prompt and verify the dots are gone:

sudo -k && sudo ls

After that, typing your password is silent again — the classic behaviour most long-time Linux users expect.

How It Works

Ubuntu is moving from the classic sudo (C) to sudo-rs, a memory-safe reimplementation in Rust. Upstream sudo-rs enabled pwfeedback by default in version 0.2.13, and Ubuntu shipped that behaviour (backported on 26.04 LTS) — a deliberate UX decision so newcomers do not think the keyboard is broken. pwfeedback is the option that draws one * per character; negating the flag (!pwfeedback) restores silent input.

Users on Ubuntu 24.04 and earlier classic sudo will not see these dots — this only affects the sudo-rs line.

Best Practice: Use a Drop-In Instead

Rather than editing /etc/sudoers directly, prefer a drop-in file that survives package upgrades:

sudo tee /etc/sudoers.d/0pwfeedback <<'EOF' Defaults !pwfeedback EOF

Verify the file is 0440 and owned by root to keep the sudoers syntax check happy:

sudo chmod 0440 /etc/sudoers.d/0pwfeedback

Bonus: Password Timeout

While you're in there, you can also tune how long sudo remembers your password between commands (default is 15 minutes):

Defaults timestamp_timeout=30

Set it to 0 to re-ask on every single command.