Skip to content

Use usermod(8) on OpenBSD to unbreak password management#294

Merged
corporate-gadfly merged 1 commit intoOpenVoxProject:mainfrom
klemensn:user-password-openbsd
Mar 21, 2026
Merged

Use usermod(8) on OpenBSD to unbreak password management#294
corporate-gadfly merged 1 commit intoOpenVoxProject:mainfrom
klemensn:user-password-openbsd

Conversation

@klemensn
Copy link
Contributor

@klemensn klemensn commented Jan 2, 2026

f1e77c2 "(PUP-3634) Hide password hash from process list for useradd"
introduced chpasswd -e which does not exist on OpenBSD, thus user
resources managing password would always fail:

Notice: Compiled catalog for atar in environment production in 0.02 seconds
rror: Could not set password on user[test]: No command chpasswd defined for provider openbsd
Error: /Stage[main]/Main/User[test]/password: change from [redacted] to [redacted] failed: Could not set password on user[test]: No command chpasswd defined for provider openbsd
Notice: Applied catalog in 0.01 seconds

Use https://man.openbsd.org/usermod.8#p instead:

Notice: Compiled catalog for atar in environment production in 0.01 seconds
Notice: /Stage[main]/Main/User[test]/password: changed [redacted] to [redacted]
Notice: Applied catalog in 0.21 seconds

password values now do show up briefly in the process list, but given
they must be encrypted in order to work, this does not seem critical.

@klemensn
Copy link
Contributor Author

klemensn commented Jan 2, 2026

@bastelfreak bastelfreak added the bug Something isn't working label Jan 2, 2026
@klemensn klemensn force-pushed the user-password-openbsd branch from bf7bb72 to 372aa8f Compare January 2, 2026 16:06
@klemensn
Copy link
Contributor Author

klemensn commented Jan 5, 2026

Linters are happy, tests used in CI seem broken and report failures entirely unrelated to this PR.

@klemensn klemensn force-pushed the user-password-openbsd branch from 372aa8f to 1d8bd7a Compare February 6, 2026 20:34
@klemensn
Copy link
Contributor Author

klemensn commented Feb 8, 2026

@bastelfreak OK to merge?

@klemensn
Copy link
Contributor Author

@buzzdeee Perhaps you want to take a look at this, too?

We're already running with a slightly different patch in our port/package, behaviour is identical, though.

@buzzdeee
Copy link
Contributor

in the port/package, we have it addressed in lib/puppet/provider/user/useradd_rb which likely breaks other OS.

This is much cleaner, tested creating users, and updating password: works for me.

@klemensn klemensn force-pushed the user-password-openbsd branch 2 times, most recently from 0f3c99b to c750d9b Compare March 20, 2026 23:42
f1e77c2 "(PUP-3634) Hide password hash from process list for useradd"
introduced `chpasswd -e` which does not exist on OpenBSD, thus `user`
resources managing `password` would always fail:

```
Notice: Compiled catalog for atar in environment production in 0.02 seconds
rror: Could not set password on user[test]: No command chpasswd defined for provider openbsd
Error: /Stage[main]/Main/User[test]/password: change from [redacted] to [redacted] failed: Could not set password on user[test]: No command chpasswd defined for provider openbsd
Notice: Applied catalog in 0.01 seconds
```

Use https://man.openbsd.org/usermod.8#p instead:

```
Notice: Compiled catalog for atar in environment production in 0.01 seconds
Notice: /Stage[main]/Main/User[test]/password: changed [redacted] to [redacted]
Notice: Applied catalog in 0.21 seconds
```

`password` values now do show up briefly in the process list, but given
they must be encrypted in order to work, this does not seem critical.
@klemensn klemensn force-pushed the user-password-openbsd branch from c750d9b to 8a2d027 Compare March 20, 2026 23:43
@corporate-gadfly corporate-gadfly merged commit b3d1b7f into OpenVoxProject:main Mar 21, 2026
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants