Switch password hashing from DES crypt to SHA-256 master
authorRemco Rijnders <remmy@serenity-irc.net>
Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)
committerRemco Rijnders <remmy@serenity-irc.net>
Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)
commited3a9a8606d8c8e759fbdff4ed43d41f4e491d32
tree827ee8c92878c86b203e915d505cc4f44f26507d
parent437f5a63b2dfb0a45165e860e38f42c7817d1517
Switch password hashing from DES crypt to SHA-256

DES crypt is trivially crackable. Passwords starting with $ are now
auto-detected as crypt hashes (supports $5$ SHA-256, $6$ SHA-512, etc).
Plaintext passwords still work for backwards compatibility.

Remove crypt_oper_password and crypt_iline_password config options —
detection is now automatic based on the $ prefix in stored passwords.

Update mkpasswd to generate SHA-256 ($5$) hashes with random salts.
Stop logging passwords (plaintext or hashed) in oper logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
doc/example.conf
src/crypt/mkpasswd.c
src/s_user.c