Find user accounts with empty passwords
A quick audit that catches passwordless accounts — a silent backdoor on any Linux box.
01Command
$ sudo awk -F: '($2 == "" ) { print $1 " has NO password" }' /etc/shadow02What it does
/etc/shadow stores password hashes, and an empty second field means that account can be logged into without typing anything — exactly the kind of leftover a fresh service install or an intruder leaves behind. This one-liner prints any such accounts, so an empty result is what you want to see. Regular system accounts normally show a hash or a '!'/'*' placeholder that blocks login.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- shadow(5) — Linux manual pageEvidence: In /etc/shadow, the second field holds the password hash; an empty field means the account can log in without a password.
Last verified: 2026-09-18 · Category: Security & Privacy
06Related solutions
Generate a modern Ed25519 public/private key pair in ~/.ssh for authenticating to servers and Git platforms without passwords.
Add or remove read, write, and execute permission for the owner, group, or others using symbolic or octal modes.
Add a UFW rule to permit inbound traffic on a TCP or UDP port, such as SSH on port 22.