# Hpf-passwd: Easily change passwords while using \`hashedPasswordFile\`

DevFeed: [Hpf-passwd: Easily change passwords while using \`hashedPasswordFile\`](<https://devfeed.tech/articles/hpf-passwd-easily-change-passwords-while-using-hashedpasswordfile-31351.md>)

Original publisher: [Read original article](<https://discourse.nixos.org/t/hpf-passwd-easily-change-passwords-while-using-hashedpasswordfile/79254>)

Author: Anomalocaris

Published: 2026-07-31T01:54:54Z

Content type: article

Language: en

Sources: [Announcements - NixOS Discourse](<https://devfeed.tech/sources/announcements-nixos-discourse.md>)

Topics: [passwords](<https://devfeed.tech/topics/passwords.md>), [passwd](<https://devfeed.tech/topics/passwd.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [account](<https://devfeed.tech/topics/account.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [announcements](<https://devfeed.tech/tags/announcements.md>), [config](<https://devfeed.tech/tags/config.md>), [passwd](<https://devfeed.tech/tags/passwd.md>), [passwords](<https://devfeed.tech/tags/passwords.md>), [script](<https://devfeed.tech/tags/script.md>), [systems](<https://devfeed.tech/tags/systems.md>)

## AI overview

The author introduces hpf-passwd, a standalone script for changing passwords for NixOS user accounts configured with hashedPasswordFile. It imitates passwd's semantics but is not a complete drop-in replacement and currently lacks features such as password expiration management.

## Source excerpt

For a while, I've used users.users.*.hashedPasswordFile with users.mutableUsers = true to minimize configuration drift. However, as far as I could tell, no one had created a convenient way to set or change these passwords, so I wrote a quick and dirty script and called it a day. More recently, I was reworking this script and realized I could decouple it completely from my config, spin it off into its own project, and polish it up so other people could benefit from it. The result is hpf-passwd. Currently, it's a single script that mainly just lets you change the password of a given user account, provided it has users.users.<username>.hashedPasswordFile set. Befitting its name, it tries to mimic passwd's semantics to try to be intuitive. However, it can never be a 1:1 drop-in replacement. As far as I am aware, there is no way to set things like expiration dates for passwords managed like this. I plan to eventually add some more features, like a chpasswd-style script, and features that ensure all the users with hashedPasswordFile have a password set to help with bootstrapping, but it's currently pretty barebones. However, it is enough for my personal needs at the moment and so I figure it is a good time to get some more eyes on it. github.com GitHub - Anomalocaridid/hpf-passwd: Manage passwords on NixOS systems that use... Manage passwords on NixOS systems that use `hashedPasswordFile` 1 post - 1 participant Read full topic