[TUHS] Questions about * and ! in the password field of passwd and shadow

Hauke Fath via TUHS tuhs at tuhs.org
Thu Jan 8 07:26:08 AEST 2026


On Wed, 7 Jan 2026 20:34:39 +0100, Marc Haber via TUHS wrote:
> Reading historic documents suggestst that ! used to be a notion for 
> "temporarily locked" while * is the notation for "this account never 
> had a password since it was created".

A while back, I looked into how various OSes set up shadow passwords, 
in a vain attempt to run YP with shadow passwords. AFAIR, neither the 
4.4BSD derived OSes (NetBSD, FreeBSD), nor Solarish (Solaris*, OmniOS) 
use an exclamation mark in the shadow file's password field.

> The mixture of * and ! in the /etc/shadow field in Debian systems is 
> kind of bothering my inner Adrian Monk, and I would like to either 
> suggest that we (Debian) change to ! for the accounts in our default 
> /etc/passwd or pester src:shadow to use * for newly created accounts.

Given that Linuxen put an 'x' into the /etc/passwd password field, when 
all other OSes I looked at use a '*', I am inclined to see the '!' as a 
Linuxism.

Cheerio,
Hauke


* <https://docs.oracle.com/cd/E88353_01/html/E37852/shadow-5.html>

-- 
Hauke Fath                        <hauke at Espresso.Rhein-Neckar.DE>
Linnéweg 7
64342 Seeheim-Jugenheim
Germany


More information about the TUHS mailing list